I have the following code:
class cutomTests(unittest.TestCase, moduleName.className):
def test_input_too_large(self):
'''className.functionName should fail with large input'''
self.assertRaises(moduleName.OutOfRangeError, self.functionName(4000)
I got the following result:
======================================================================
ERROR: test_input_too_large (__main__.customTests)
className.functionName should fail with large input
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/workspace//ClassNameTests.py", line 37, in test_input_too_large
self.assertRaises(toRoman.OutOfRangeError, self.answer(4000))
File "/home/user/workspace/moduleName.py", line 47, in answer
raise OutOfRangeError()
OutOfRangeError
So the results should be pass right because the exception is raised???