check that exception messages are not empty (#22379)

Patch by Yongzhi Pan.
This commit is contained in:
Benjamin Peterson 2014-09-28 12:56:42 -04:00
parent 623ae29469
commit c31f12d196
4 changed files with 13 additions and 15 deletions

View file

@ -298,6 +298,7 @@ class BaseBytesTest:
seq = [b"abc"] * 1000
expected = b"abc" + b".:abc" * 999
self.assertEqual(dot_join(seq), expected)
self.assertRaises(TypeError, self.type2test(b" ").join, None)
# Error handling and cleanup when some item in the middle of the
# sequence has the wrong type.
with self.assertRaises(TypeError):