Skip to content

Commit

Permalink
Update assertRaises syntax to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Oct 10, 2018
1 parent d799002 commit 52bd312
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapscript/python/tests/cases/line_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def testAddPointToLine(self):
self.addPointToLine(self.line, new_point)
assert self.line.numpoints == 3

def xtestAlterNumPoints(self):
def testAlterNumPoints(self):
"""
numpoints is immutable, this should raise error
Currently no error is raised, but the numpoints is unchanged
"""
self.assertRaises(AttributeError, setattr, self.line, 'numpoints', 3)
with self.assertRaises(AttributeError):
self.line.numpoints = 3


if __name__ == '__main__':
Expand Down

0 comments on commit 52bd312

Please sign in to comment.