Skip to content
Permalink
Browse files

Change assertRaises logic as it fails on Appveyor

  • Loading branch information...
geographika committed Oct 11, 2018
1 parent 8dec121 commit b400e284075eaa93b6d6e18f490e4547afb6b55d
Showing with 10 additions and 1 deletion.
  1. +10 −1 mapscript/python/tests/cases/line_test.py
@@ -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__':

0 comments on commit b400e28

Please sign in to comment.
You can’t perform that action at this time.