-
Notifications
You must be signed in to change notification settings - Fork 279
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
Remove test file runnability #5809
Labels
Comments
This would be consistent with the decision in |
It makes sense to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Historically our test files have been runnable as independent Python scripts e.g.
python test_pp_cf.py
. We even customise the help message e.g.python test_pp_cf.py --help
.This relies on the block below, plus the inclusion of
if __name__ == "__main__": tests.main()
in every test file.iris/lib/iris/tests/__init__.py
Lines 91 to 135 in c6151e8
Now we are using PyTest I often do not import the
tests
module, and I have not bothered making my files runnable since they are intended to be run via PyTest e.g.pytest test_pp_cf.py
.I think we should remove the runnability from our tests, and if those extra command line options are important then we should explore how they can be offered via PyTest configurability instead. Happy to discuss.
The text was updated successfully, but these errors were encountered: