commit | d2ead822e48d87e99edf320b8a38a1a33c82cc00 | [log] [tgz] |
---|---|---|
author | Jean-Paul Calderone <exarkun@divmod.com> | Thu Jul 16 19:03:30 2009 -0400 |
committer | Jean-Paul Calderone <exarkun@divmod.com> | Thu Jul 16 19:03:30 2009 -0400 |
tree | 22680488ca45001a6d436430c94cbb8cafdb7ae2 | |
parent | 8b32799811b2cfc6c1c18c3723aac2fcfaf8bb45 [diff] [blame] |
Compatibility with Python < 2.5 - ValueError in older versions do not have a message attribute
diff --git a/test/test_rand.py b/test/test_rand.py index 09056d7..05bf8c8 100644 --- a/test/test_rand.py +++ b/test/test_rand.py
@@ -26,7 +26,7 @@ b3 = rand.bytes(num_bytes=0) self.assertEqual(len(b3), 0) exc = self.assertRaises(ValueError, rand.bytes, -1) - self.assertEqual(exc.message, "num_bytes must not be negative") + self.assertEqual(str(exc), "num_bytes must not be negative") def test_add(self):