Commit f3faad7e by George Song

Strip `c` from `.pyc` for error message comparison

In Python 2.7, `__file__` returns `.pyc` by default, this breaks our
comparison so let's strip out the trailing `c`.
parent 198dbc1e
......@@ -60,7 +60,7 @@ class InterceptErrorsTest(TestCase):
u"keyword arguments '{{'raise_error': <class '{}'>}}' "
u"from File \"{}\", line XXX, in test_logs_errors\n"
u" intercepted_function(raise_error=FakeInputException): FakeInputException()"
).format(exception, __file__)
).format(exception, __file__.rstrip('c'))
# Verify that the raised exception has the error message
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment