Skip to content

Commit

Permalink
Change assertRaises logic as it fails on Appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Oct 11, 2018
1 parent 8dec121 commit b400e28
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mapscript/python/tests/cases/line_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,17 @@ def testAlterNumPoints(self):
"""
numpoints is immutable, this should raise error
"""
with self.assertRaises(AttributeError):
# The following works locally but fails on Appveyor (error is not raised)
# with self.assertRaises(AttributeError):
# self.line.numpoints = 3

error_thrown = False
try:
self.line.numpoints = 3
except AttributeError:
error_thrown = True

assert error_thrown is True


if __name__ == '__main__':
Expand Down

0 comments on commit b400e28

Please sign in to comment.