`test_perturbations.py` takes a lot of time
See original GitHub issueWhile testing using pytest, the test hangs for a sufficiently long time while test_perturbations.py runs.
Running the following shows that it takes ~140s to run test_solar_pressure in test_perturbations.py which when combined with other durations, gives a significant test time as a whole.
pytest --durations=4
Output:
======================================================================== slowest 4 durations =========================================================================
143.81s call tests/tests_twobody/test_perturbations.py::test_solar_pressure[200-deltas_expected0]
142.41s call tests/tests_twobody/test_perturbations.py::test_solar_pressure[400-deltas_expected1]
138.72s call tests/tests_twobody/test_perturbations.py::test_solar_pressure[600-deltas_expected2]
59.31s call tests/tests_twobody/test_perturbations.py::test_3rd_body_Curtis[test_params2]
Specifically, the problem seems to be in the test_solar_pressure function. This particularly stood out to me since other tests take much less time.
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
How to speed up pytest - python - Stack Overflow
It seems to spend a lot of time collecting tests, even if I specify which files to execute on the command line. I...
Read more >Frequency Response Testing in Nuclear Reactors
Typical rod motions are fiin. per step and the minimum time between steps is ... However, because of the small displacement per step,...
Read more >Scientific and Technical Aerospace Reports
Analysis of astronomical spectra requires accurate atomic data , and in ... space - time , as well as ' test ' perturbations...
Read more >Bioinformatics in Microbiota - Page 241 - Google Books Result
(H) Evaluation of the similarity between the observed and predicted time series ... This option can be used to test perturbations in the...
Read more >Rounds of the Teaching Staff
However , serum samples for insulin must be kept frozen from the time of ... PRA requires very special attention to prevent renin...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

And yes, unfortunately these tests take a lot of time because we validate against long propagations found in the literature. They are sort of “integration tests” and there’s not much we can do about them, except perhaps give them another pass and see if we can rewrite absolutely everything in numba.
Partially addressed in #1250 (thanks @jtegedor!), however there is still more work to do. In particular, one of the functions was jitted in object mode because otherwise numba would give a weird error. We need to investigate more.