python-intermediate-development
python-intermediate-development copied to clipboard
Add information about additional helpful pytest features
trafficstars
In the course of a run of the course at UKAEA, the following feedback was collected:
- Recommend adding
idsargument topytest.parameterise, e.g. else you can have a testmy_test[1-2-None]which is not very informative. - Explaining how to run one sub-test (encourage quotes for cross-shell compatibility - zsh doesnt like without):
pytest -k "my_test[iteration-name]" - Mention other useful opts?
-sstdout-xterminate on first fail-vshow each test by name
@kzscisoft I believe it might have been you to add this? Anything further you might add?
The usual concern is adding more material to an already lengthy course. However, perhaps this could be added as an "Optional" exercise for learners that are a little bit ahead?