Skip to content

Commit

Permalink
removed warnings and updated for amended dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepearson committed Jun 6, 2024
1 parent 9a9998a commit afb4e1b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions tests/test_vector_linz/test_vector_linz.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class LinzVectorsTest(unittest.TestCase):
"id": [1775717, 1775718, 1775719, 1778938, 1778939],
}
PASTURAL_LEASE = {
"area": 13278778764.94074,
"area": 13189155932.7776,
"geometryType": "MultiPolygon",
"length": 15648834.84743058,
"length": 15552938.848015543,
"columns": ["geometry", "id", "lease_name"],
"id": [12511, 12653, 12658, 12797, 12461],
}
Expand Down Expand Up @@ -106,10 +106,10 @@ def compare_to_benchmark(

# check various shape attributes match those expected
self.assertEqual(
features.loc[0].geometry.geometryType(),
features.loc[0].geometry.geom_type,
benchmark["geometryType"],
"The geometryType of the returned {description} "
f"`{features.loc[0].geometry.geometryType()}` differs from the expected "
f"`{features.loc[0].geometry.geom_type}` differs from the expected "
f"{benchmark['geometryType']}",
)
self.assertEqual(
Expand Down
12 changes: 6 additions & 6 deletions tests/test_vector_linz_in_bounds/test_vector_linz_in_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class LinzVectorsTest(unittest.TestCase):

# The expected datasets and files to be downloaded - used for comparison in the later tests
LAND = {
"area": 150539776091.31247,
"area": 150539779947.93246,
"geometryType": "Polygon",
"length": 6002892.54900315,
"length": 6002542.642926594,
"columns": [
"geometry",
"name",
Expand All @@ -59,7 +59,7 @@ class LinzVectorsTest(unittest.TestCase):
BATHYMETRY_CONTOURS = {
"area": 0.0,
"geometryType": "LineString",
"length": 144353.73387463146,
"length": 144353.7338746315,
"columns": [
"geometry",
"fidn",
Expand All @@ -74,7 +74,7 @@ class LinzVectorsTest(unittest.TestCase):
"sorind",
"hypcat",
],
"valdco": [2.0, 2.0, 0.0, 0.0, 0.0],
"valdco": [0.0, 0.0, 2.0, 0.0, 2.0],
}
CHATHAM_CONTOURS = None

Expand Down Expand Up @@ -152,10 +152,10 @@ def compare_to_benchmark(

# check various shape attributes match those expected
self.assertEqual(
features.loc[0].geometry.geometryType(),
features.loc[0].geometry.geom_type,
benchmark["geometryType"],
f"The geometryType of thereturned {description} "
f" `{features.loc[0].geometry.geometryType()}` differs from the expected "
f" `{features.loc[0].geometry.geom_type}` differs from the expected "
f"{benchmark['geometryType']}",
)
self.assertEqual(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ def compare_to_benchmark(

# check various shape attributes match those expected
self.assertEqual(
features.loc[0].geometry.geometryType(),
features.loc[0].geometry.geom_type,
benchmark["geometryType"],
"The geometryType of the returned {description} "
f"`{features.loc[0].geometry.geometryType()}` differs from the expected "
f"`{features.loc[0].geometry.geom_type}` differs from the expected "
f"{benchmark['geometryType']}",
)
self.assertEqual(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vector_stats_nz/test_vector_stats_nz.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def compare_to_benchmark(

# check various shape attributes match those expected
self.assertEqual(
features.loc[0].geometry.geometryType(),
features.loc[0].geometry.geom_type,
benchmark["geometryType"],
"The geometryType of the"
+ f" returned {description} `{features.loc[0].geometry.geometryType()}` differs from the "
+ f" returned {description} `{features.loc[0].geometry.geom_type}` differs from the "
+ f"expected {benchmark['geometryType']}",
)
self.assertEqual(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def compare_to_benchmark(

# check various shape attributes match those expected
self.assertEqual(
features.loc[0].geometry.geometryType(),
features.loc[0].geometry.geom_type,
benchmark["geometryType"],
"The geometryType of the"
+ f" returned {description} `{features.loc[0].geometry.geometryType()}` differs from the "
+ f" returned {description} `{features.loc[0].geometry.geom_type}` differs from the "
+ f"expected {benchmark['geometryType']}",
)
self.assertEqual(
Expand Down

0 comments on commit afb4e1b

Please sign in to comment.