Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes in 3 tests #155

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def test_extract_featurecollection():
assert len(topo["objects"]) == 2
assert len(topo["bookkeeping_geoms"]) == 2
assert len(topo["linestrings"]) == 2
assert topo["objects"]["feature_0"]["geometries"][0]["type"] == "LineString"
assert topo["objects"]["feature_0"]["type"] == "LineString"
assert (
topo["objects"]["feature_1"]["geometries"][0]["geometries"][0]["type"]
topo["objects"]["feature_1"]["geometries"][0]["type"]
== "Polygon"
)

Expand Down Expand Up @@ -420,7 +420,7 @@ def test_extract_shapefile_org_data_untouched():

data = shapefile.Reader("tests/files_shapefile/southamerica.shp")
topo = Extract(data).to_dict()
topo_0 = topo["objects"]["feature_00"]["geometries"][0]
topo_0 = topo["objects"]["feature_00"]
data_0 = data.__geo_interface__["features"][0]["geometry"]

assert "arcs" in topo_0.keys()
Expand Down
10 changes: 7 additions & 3 deletions tests/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def test_topology_to_geojson_nested_geometrycollection():
{
"type": "Polygon",
"coordinates": [[[0.5, 0.6], [0.7, 0.8], [0.9, 1.0]]],
}
},
{
"type": "LineString",
"coordinates": [[0.1, 0.2], [0.3, 0.4]],
}
],
},
},
Expand All @@ -268,8 +272,8 @@ def test_topology_to_geojson_nested_geometrycollection():
}
topo = topojson.Topology(data).to_geojson()

assert "]]]}]}]}}]}" in topo

assert ']]}]}}]}' in topo

def test_topology_to_geojson_polygon_geometrycollection():
data = {
Expand Down