Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about additional helpful pytest features #372

Open
bielsnohr opened this issue Aug 14, 2024 · 0 comments
Open

Add information about additional helpful pytest features #372

bielsnohr opened this issue Aug 14, 2024 · 0 comments

Comments

@bielsnohr
Copy link
Collaborator

In the course of a run of the course at UKAEA, the following feedback was collected:

  • Recommend adding ids argument to pytest.parameterise, e.g. else you can have a test my_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?
    • -s stdout
    • -x terminate on first fail
    • -v show 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant