-
Notifications
You must be signed in to change notification settings - Fork 14
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
Testing suite should be machine and user agnostic #692
Comments
The lines that create this file are pyaerocom/tests/io/test_iris_io.py Lines 66 to 68 in e9f2666
The quick'n dirty solution would be to create a temporary directory each time with - FAKE_FILE = Path(tempfile.gettempdir()) / "test_iris_io/invalid.nc"
+ FAKE_FILE = Path(tempfile.mkdtemp()) / "test_iris_io/invalid.nc" IMO, this file should be created inside a fixture and modify the tests consuming this file to use the fixture. |
I can find only one other usage of pyaerocom/tests/test_config.py Lines 18 to 25 in e9f2666
Fortunately, However, like on my last comment I would prefer these temporary files to be provided by fixtures. |
When trying to run the test suit on PPI, I ran into an issue with permissions. e.g.,
After chatting with @jgriesfeller and @avaldebe and a ticket to IT to change ownership of the directories needed for testing to @jgriesfeller, we concluded that testing is not multi-user capable.
In order for tests to be run agnostically, they should not depend on
/tmp
, but rather be specific to the machine and $USER (@jgriesfeller please let me know if I am forgetting anything). The Python module tempfile may be starting point for thinking of a solution.The text was updated successfully, but these errors were encountered: