Skip to content

Commit

Permalink
Merge pull request #401 from DOV-Vlaanderen/fix_no_gml_test
Browse files Browse the repository at this point in the history
Fix GMLObject tests.
  • Loading branch information
Roel authored Jul 9, 2024
2 parents c0db31f + 68efdb6 commit 43a2b60
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 43a2b60

Please sign in to comment.