Skip to content
Permalink
Browse files
Update assertRaises syntax to fix test
  • Loading branch information
geographika committed Oct 10, 2018
1 parent d799002 commit 52bd312942f216cab9efdebddb67872014a9bd76
Showing 1 changed file with 3 additions and 3 deletions.
@@ -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__':

0 comments on commit 52bd312

Please sign in to comment.