-
Notifications
You must be signed in to change notification settings - Fork 117
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
Feature/move tests to integration #709
Conversation
Move test: test_calc_geom_impact_polys situated in: climada/util/test/test_lines_polys_handler.py:289 to: climada/test/test_util.py the test takes around 16 seconds
Tests moved: 1) climada/hazard/test/test_storm_europe/test_icon_read (~ 4.5 sec) 2 ) climada/hazard/test/test_storm_europe/test_from_footprints (~ 6 sec) Destination: 1) climada/test/test_hazard/test_icon_read 2) climada/test/test_hazard/test_from_footprints
Move test: 1) climada/hazard/test/test_ibtracks_with_basin (~6 sec) 2) climada/hazard/test/test_cutoff_tracks (~5 sec) Destination: 1) climada/test/test_hazard/test_ibtracks_with_basin 2)climada/test/test_hazard/test_cutoff_tracks
Move tests: 1) climada/hazard/test/test_base/test_write_read_pass (4.5 sec) 2)climada/hazard/test/test_base/test_raster_to_vector_pass (3.5 sec) 3)climada/hazard/test/test_base/test_reproject_raster_pass (3.6 sec) Destination: 1) climada/test/test_hazard/test_write_read_pass 2) climada/test/test_hazard/test_raster_to_vector_pass 3) climada/test/test_hazard/test_reproject_raster_pass
Excellent initiative, @NicolasColombi, thanks a lot! 🙌 I used black to format the new file and the inserted code in On my system, one test of
|
Hi @peanutfun, Thanks a lot for the review!! 😄 I run all the tests again and they pass, including |
Changes proposed in this PR:
Move lazy unittest which loads data multiple time to the integration folder.
List of tests moved:
climada/util/test/test_lines_polys_handler/test_calc_geom_impact_polys
(~ 15.5 sec)climada/hazard/test/test_storm_europe/test_icon_read
(~ 4.5 sec)climada/hazard/test/test_storm_europe/test_from_footprints
(~ 6 sec)climada/hazard/test/test_ibtracs_with_basin
(~6 sec)climada/hazard/test/test_cutoff_tracks
(~5 sec)climada/hazard/test/test_base/test_write_read_pass
(4.5 sec)climada/hazard/test/test_base/test_raster_to_vector_pass
(3.5 sec)climada/hazard/test/test_base/test_reproject_raster_pass
(3.6 sec)This PR decrease the cost of unittest by around 51s. All tests are placed in the integration folder either under
test_hazard.py
under a new classes, or in the new filetest_util.py
.The above tests share in common the following characteristics:
PR Author Checklist
develop
)PR Reviewer Checklist