Skip to content
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

Test suite does not run without internet access #1468

Closed
1 of 2 tasks
huard opened this issue Sep 8, 2023 · 2 comments · Fixed by #1473
Closed
1 of 2 tasks

Test suite does not run without internet access #1468

huard opened this issue Sep 8, 2023 · 2 comments · Fixed by #1473
Labels
enhancement New feature or request

Comments

@huard
Copy link
Collaborator

huard commented Sep 8, 2023

Addressing a Problem?

I sometimes work offline and it's problematic that the test suite does not work without internet access.

Potential Solution

Rely on cached test data.

Additional context

No response

Contribution

  • I would be willing/able to open a Pull Request to contribute this feature.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@huard huard added the enhancement New feature or request label Sep 8, 2023
@Zeitsperre
Copy link
Collaborator

Just tried this now in a slightly modified branch. The good news is that the vast majority of tests will pass as they are currently written. The tests that require some aid are:

FAILED tests/test_analog.py::test_spatial_analogs[seuclidean] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[nearest_neighbor] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[zech_aslan] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[szekely_rizzo] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[friedman_rafsky] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[kolmogorov_smirnov] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs[kldiv] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_unsupported_spatial_analog_method - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_analog.py::test_spatial_analogs_multi_index - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_missing.py::TestMissingAnyFills::test_hydro - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_calendar.py::test_get_calendar[file0-noleap-365] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_calendar.py::test_get_calendar[file1-360_day-360] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fine_fuel_moisture_code - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_duff_moisture_code - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_drought_code - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_initial_spread_index - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_build_up_index - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_weather_index - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_cffwis_indicator - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_partitioning.py::test_hawkins_sutton_smoke - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_season_R[id1_default-kwargs0] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_temperature.py::test_degree_days_exceedance_date - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_season_R[id2_default-kwargs1] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_season_R[id3_default-kwargs2] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_season_R[id1_start10_end3-kwargs3] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_fire_season_R[id1_start10_end3_YS-kwargs4] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_cffwis.py::TestCFFWIS::test_gfwed_and_indicators - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_testing_utils.py::TestFileRequests::test_get_failure - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_testing_utils.py::TestFileRequests::test_open_dataset_with_bad_file - AssertionError: assert 'bc51206e6462fc8ed08fd4926181274c' != 'bc51206e6462fc8ed08fd4926181274c'
FAILED tests/test_sdba/test_measures.py::test_bias - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_relative_bias - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_ratio - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_rmse - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_adjustment.py::TestQM::test_add_dims[True] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_adjustment.py::TestQM::test_add_dims[False] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_mae - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_annual_cycle_correlation - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_adjustment.py::TestExtremeValues::test_real_data - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_measures.py::test_taylordiagram - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_processing.py::test_stack_variables - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_processing.py::test_unpack_moving_yearly_window[True] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_processing.py::test_unpack_moving_yearly_window[False] - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
FAILED tests/test_sdba/test_properties.py::TestProperties::test_get_measure - urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

Will open a PR to see what can be done.

@Zeitsperre
Copy link
Collaborator

Additionally, this might be useful for later: https://github.com/miketheman/pytest-socket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants