Problem with Unittest:
Karl Scalet
news at yebu.de
Tue May 13 12:11:14 EDT 2003
[...]
>
> class dufferTest(unittest.TestCase):
> def test_duffer(self):
> - self.assertRaises(ValueError(), duffer())
> + self.assertRaises(ValueError, duffer())
>
>
if I remember correctly, it's even to go one further:
self.assertRaises(ValueError, differ)
as the second argument needs to be a callable, leaving
the possibility to pass arguments like:
self.assertRaises(ValueError, differ, arg1, arg2)
Karl
More information about the Python-list
mailing list