diff --git a/packages/fiona/meta.yaml b/packages/fiona/meta.yaml index 71c74b675..f0a4707f4 100644 --- a/packages/fiona/meta.yaml +++ b/packages/fiona/meta.yaml @@ -1,9 +1,9 @@ package: name: fiona - version: 1.8.22 + version: 1.9.5 source: - url: https://files.pythonhosted.org/packages/b9/d7/48025179fbbb2e1bab698131246878df36fa9aa5bee0ba1c062cd8f2ef44/Fiona-1.8.22.tar.gz - sha256: a82a99ce9b3e7825740157c45c9fb2259d4e92f0a886aaac25f0db40ffe1eea3 + url: https://files.pythonhosted.org/packages/83/a0/6b870864ceebcd046d2e952b0d18932812ff7a48d3b05670af3f702d9c01/fiona-1.9.5.tar.gz + sha256: 99e2604332caa7692855c2ae6ed91e1fffdf9b59449aa8032dd18e070e59a2f7 test: imports: - fiona @@ -31,6 +31,15 @@ build: echo ${GDAL_CONFIG} echo ${GDAL_DATA} echo ${PROJ_LIB} + rm tests/test_fio* # CLI tests + rm tests/test_data_paths.py # CLI tests + rm tests/test_datetime.py # CLI tests + rm tests/test_vfs.py # No module named "boto3" + rm tests/test_env.py # No module named "boto3" + + mkdir fiona-tests + mv tests fiona-tests + tar -cf ${DISTDIR}/fiona-tests.tar fiona-tests about: home: http://github.com/Toblerity/Fiona diff --git a/packages/fiona/test_data/fiona-tests-1.8.21.zip b/packages/fiona/test_data/fiona-tests-1.8.21.zip deleted file mode 100644 index 9255aec37..000000000 Binary files a/packages/fiona/test_data/fiona-tests-1.8.21.zip and /dev/null differ diff --git a/packages/fiona/test_fiona.py b/packages/fiona/test_fiona.py index 7497d210e..e1e236273 100644 --- a/packages/fiona/test_fiona.py +++ b/packages/fiona/test_fiona.py @@ -1,10 +1,6 @@ -import pathlib - import pytest from pytest_pyodide import run_in_pyodide -TEST_DATA_PATH = pathlib.Path(__file__).parent / "test_data" - @pytest.mark.driver_timeout(60) @run_in_pyodide(packages=["fiona"]) @@ -15,60 +11,36 @@ def test_supported_drivers(selenium): @pytest.mark.driver_timeout(60) -def test_runtest(selenium): - @run_in_pyodide(packages=["fiona", "pytest"]) - def _run(selenium, data): - import zipfile +@run_in_pyodide(packages=["fiona-tests", "pytest"]) +def test_fiona(selenium_standalone): + import site + import sys - with open("tests.zip", "wb") as f: - f.write(data) + import pytest - with zipfile.ZipFile("tests.zip", "r") as zf: - zf.extractall("tests") + sys.path.append(site.getsitepackages()[0] + "/fiona-tests") - import sys - - sys.path.append("tests") - - import pytest - - def runtest(test_filter, ignore_filters): - ignore_filter = [] - for ignore in ignore_filters: - ignore_filter.append("--ignore-glob") - ignore_filter.append(ignore) - - ret = pytest.main( - [ - "--pyargs", - "tests", - "--continue-on-collection-errors", - # "-v", - *ignore_filter, - "-k", - test_filter, - ] - ) - assert ret == 0 - - runtest( - ( - "not ordering " # hangs - "and not env " # No module named "boto3" - "and not slice " # GML file format not supported - "and not GML " # GML file format not supported - "and not TestNonCountingLayer " # GPX file format not supported - "and not test_schema_default_fields_wrong_type " # GPX file format not supported - "and not http " - "and not FlatGeobuf" # assertion error - ), + def runtest(test_filter): + ret = pytest.main( [ - "tests/test_fio*", # no CLI tests - "tests/test_data_paths.py", # no CLI tests - "tests/test_datetime.py", # no CLI tests - "tests/test_vfs.py", # No module named "boto3" - ], + "--pyargs", + "tests", + "--continue-on-collection-errors", + # "-v", + "-k", + test_filter, + ] ) + assert ret == 0 - TEST_DATA = (TEST_DATA_PATH / "fiona-tests-1.8.21.zip").read_bytes() - _run(selenium, TEST_DATA) + runtest( + " not ordering " # hangs + " and not env " # No module named "boto3" + " and not slice " # GML file format not supported + " and not GML " # GML file format not supported + " and not TestNonCountingLayer " # GPX file format not supported + " and not test_schema_default_fields_wrong_type " # GPX file format not supported + " and not http " + " and not FlatGeobuf" # assertion error + " and not esri_only_wkt" # format not supported + )