Skip to content

Commit

Permalink
CLI flag for testing shapefile URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgilmanAIDENTIFIED committed Aug 24, 2023
1 parent 38b91a8 commit 902f982
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions us/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ def pytest_addoption(parser):
default=False,
help="enable DC statehood tests (you must export DC_STATEHOOD envvar)",
)
parser.addoption(
"--shapefile-urls",
action="store_true",
dest="shapefile_urls",
default=False,
help="test for existence of shapefile URLs on census server"
)
1 change: 1 addition & 0 deletions us/tests/test_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def test_cache():
]


@pytest.mark.skipif("not config.getoption('shapefile_urls')")
@pytest.mark.parametrize("url", shapefile_urls)
def test_shapefiles_head(url):
import requests
Expand Down

0 comments on commit 902f982

Please sign in to comment.