Skip to content

Commit

Permalink
Fix GMLObject tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel committed Jun 11, 2024
1 parent c0db31f commit 68efdb6
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/test_util_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,13 @@ def test_gmlobject_no_gml(self):
Test whether an ValueError is raised.
"""
with open('tests/data/types/boring/boring.xml', 'r') as xmlfile:
with open('tests/data/types/interpretaties/gecodeerde_lithologie/'
'gecodeerde_lithologie.xml', 'r') as xmlfile:
xml = xmlfile.read()

with pytest.raises(ValueError) as error:
with pytest.raises(ValueError, match='not to be valid GML3.2'):
GmlObject(xml)

assert 'not to be valid GML3.2' in error

def test_gmlobject_old_gml(self):
"""Test the GmlObject type with XML that is GML 3.1.1
Expand All @@ -236,11 +235,9 @@ def test_gmlobject_old_gml(self):
'r') as xmlfile:
xml = xmlfile.read()

with pytest.raises(ValueError) as error:
with pytest.raises(ValueError, match='older'):
GmlObject(xml)

assert 'older' in error


class TestBinarySpatialFilters(object):
"""Class grouping tests for the AbstractBinarySpatialFilter subtypes."""
Expand Down

0 comments on commit 68efdb6

Please sign in to comment.