I can't logging.exception(ValidationError) it seems that the object is not hashable.
That's sad, it used to work pretty well on 1.1. I'm using Python 3.4.
class TestUnhashable(unittest.TestCase):
def test_type_error_is_hashable(self):
try:
raise TypeError('Foo bar')
except TypeError as e:
logging.exception(e)
def test_validation_error_is_unhashable(self):
try:
raise ValidationError('Foo bar')
except ValidationError as e:
with self.assertRaises(TypeError) as c:
logging.exception(e)
self.assertIsInstance(c.exception, TypeError)
self.assertEqual(c.exception.args[0], 'unhashable type: \'ValidationError\'')
I can't
logging.exception(ValidationError)it seems that the object is not hashable.That's sad, it used to work pretty well on 1.1. I'm using Python 3.4.