Skip to content

Commit

Permalink
ci: add world borders test data to git
Browse files Browse the repository at this point in the history
Way easier than following around mirrors that go down.
  • Loading branch information
OliverHofkens committed Jun 28, 2024
1 parent 1a37aea commit 1d11ffd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ ENV/
node_modules/

tests/integration/django/db/*
tests/data/world_borders*
tests/data/world_borders/*
Binary file added tests/data/world_borders.zip
Binary file not shown.
12 changes: 0 additions & 12 deletions tests/integration/django_geo/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import urllib.request as req
from pathlib import Path
from zipfile import ZipFile

Expand All @@ -19,17 +18,6 @@ def world_borders_dataset(data_dir: Path):
return target_dir

filename_zip = target_dir.with_suffix(".zip")

if not filename_zip.exists():
opener = req.build_opener()
opener.addheaders = [("Accept", "application/zip")]
req.install_opener(opener)
req.urlretrieve(
"https://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip",
filename_zip,
)
assert filename_zip.exists()

with ZipFile(filename_zip, "r") as z:
z.extractall(target_dir)

Expand Down

0 comments on commit 1d11ffd

Please sign in to comment.