Fix a test under python 3.5

This commit is contained in:
Bernie Hackett 2015-09-22 13:14:05 -07:00
parent e0bfbaa0be
commit 6440ebe89a

View File

@ -792,7 +792,7 @@ class TestBSON(unittest.TestCase):
except InvalidBSON:
exc_type, exc_value, exc_tb = sys.exc_info()
# Original re error was captured and wrapped in InvalidBSON.
self.assertEqual(exc_value.args[0], 'bad character range')
self.assertTrue('bad character range' in exc_value.args[0])
# Traceback includes bson module's call into re module.
for filename, lineno, fname, text in traceback.extract_tb(exc_tb):