You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running pytest -v takes ~ 6 minutes (laptop). The test file oceanspy/tests/test_open_oceandataset.pystalls for a very long there. Sometimes in the past I have had to kill the testing. I ran tests without the file as follows
and it took about 4 minutes to finish through. Better but not ideal...
Approaches:
Refactor testing
Add parallelism
What I Did
Add parallelism to the testing via pytest-xdist. pip Install it and then run:
pytest-v-n4
It took consistently a little over 1 minute to be done with all testing (N=10)!!!. However, sometimes pytest would err before testing even began during collection the 4 workers
collecting: 0/4workers
error was not very helpful. Trying again would always work. Not sure why... I think refactor is still needed, but this was a huge improvements.
Side note on slowest test files
Testing spit out a very interesting RunTimeError with the slow testing file :
most recent
Description
Running
pytest -v
takes ~ 6 minutes (laptop). The test fileoceanspy/tests/test_open_oceandataset.py
stalls for a very long there. Sometimes in the past I have had to kill the testing. I ran tests without the file as followsand it took about 4 minutes to finish through. Better but not ideal...
Approaches:
What I Did
Add parallelism to the testing via pytest-xdist. pip Install it and then run:
It took consistently a little over 1 minute to be done with all testing (N=10)!!!. However, sometimes
pytest
would err before testing even began during collection the 4 workerserror was not very helpful. Trying again would always work. Not sure why... I think refactor is still needed, but this was a huge improvements.
Side note on slowest test files
Testing spit out a very interesting RunTimeError with the slow testing file :
Groups is part of NetCDF4 and not of netCDF3. Perhaps the reason of why that test takes a very long time?
The text was updated successfully, but these errors were encountered: