Skip to content
Snippets Groups Projects
Commit 54f053d2 authored by Duc Le's avatar Duc Le
Browse files

Re #10147 - fixed unittest to use assertRaises syntax for Python2

parent ba4c54b4
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,7 @@ class PyChop2Tests(unittest.TestCase):
self.assertTrue(modulenames[inc] in chopobj.getObject().__module__)
# Code should give an error if the chopper settings and Ei have
# not been set.
with self.assertRaises(ValueError):
chopobj.getResolution()
self.assertRaises(ValueError, chopobj.getResolution)
if 'Fermi' in modulenames[inc]:
chopobj.setChopper('s', 200)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment