File: test_datasets.py

package info (click to toggle)
python-geopandas 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,752 kB
  • sloc: python: 26,021; makefile: 147; sh: 25
file content (15 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from geopandas import GeoDataFrame, read_file
from geopandas.datasets import get_path

import pytest


@pytest.mark.parametrize(
    "test_dataset", ["naturalearth_lowres", "naturalearth_cities", "nybb", "foo"]
)
def test_read_paths(test_dataset):
    with pytest.raises(
        AttributeError,
        match=r"The geopandas\.dataset has been deprecated and was removed",
    ):
        assert isinstance(read_file(get_path(test_dataset)), GeoDataFrame)