Skip to content

Commit 83bd5b5

Browse files
committed
chore: add flaky test marker for failing downloads
1 parent db048ba commit 83bd5b5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/population/test_approximation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
get_edge_population,
1111
)
1212

13+
from tests.conftest import mark_xfail_flaky_download
1314

15+
16+
@mark_xfail_flaky_download
1417
def test_add_edge_population(test_city_small_copy):
1518
"""Test the `add_edge_population` function by design."""
1619
_, graph = test_city_small_copy

tests/population/test_ghsl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
from superblockify.config import Config
1212
from superblockify.population import ghsl
1313

14+
from tests.conftest import mark_xfail_flaky_download
1415

16+
17+
@mark_xfail_flaky_download
1518
@pytest.mark.parametrize(
1619
"resample_factor, no_window",
1720
[
@@ -40,6 +43,7 @@ def test_resample_load_window_gdf(resample_factor, no_window, test_one_city_copy
4043
assert isinstance(res_affine, Affine)
4144

4245

46+
@mark_xfail_flaky_download
4347
@pytest.mark.parametrize("window", [True, False, 1, 1.0, "test"])
4448
def test_resample_load_window_gdf_wrong_type(window, test_one_city_copy):
4549
"""Test loading and resampling a gdf window with wrong type."""
@@ -179,6 +183,7 @@ def test_get_ghsl_urls_invalid_bbox(bbox_moll):
179183
)
180184

181185

186+
@mark_xfail_flaky_download
182187
@pytest.mark.parametrize(
183188
"urls",
184189
[
@@ -226,6 +231,7 @@ def test_download_ghsl_invalid_urls(url, save_dir):
226231
ghsl.download_ghsl(base_path + url, save_dir=save_dir)
227232

228233

234+
@mark_xfail_flaky_download
229235
def test_download_ghsl_create_save_dir(_delete_ghsl_tifs):
230236
"""Test the download_ghsl function with non-existent save_dir."""
231237
url = base_path + (

0 commit comments

Comments
 (0)