diff --git a/tests/test_maps.py b/tests/test_maps.py index d33b58f89..63d8ae083 100644 --- a/tests/test_maps.py +++ b/tests/test_maps.py @@ -1,6 +1,7 @@ import doctest import json import pytest +from collections import OrderedDict import datascience as ds from datascience import maps @@ -54,6 +55,16 @@ def test_map_marker_and_region(states): ds.Map([region]).show() ds.Map([marker, region]).show() +def test_map_property_features(states): + + feature_list = states.features + assert isinstance(feature_list, list) + assert isinstance(feature_list[0], OrderedDict) + assert feature_list[0]['id'] == 'AL' + assert feature_list[0]['name'] == 'Alabama' + assert isinstance(feature_list[0]['feature'], maps.Region) + tt = [list(i.keys()) == ['id', 'feature', 'name'] for i in feature_list] + assert all(tt) ########## # ds.Marker # diff --git a/tests/test_tables.py b/tests/test_tables.py index 62731472e..fc8cafe59 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -1893,4 +1893,4 @@ def test_read_table(): assert isinstance(Table().read_table("tests/us-unemployment.csv"), Table) assert isinstance(Table().read_table("tests/us-unemployment-copy"), Table) assert isinstance(Table().read_table("tests/us-unemployment.txt"), Table) - assert isinstance(Table().read_table("https://raw.githubusercontent.com/data-8/textbook/gh-pages/data/deflategate.csv"), Table) + assert isinstance(Table().read_table("https://raw.githubusercontent.com/data-8/textbook/main/assets/data/deflategate.csv"), Table)