Commit eabafebf authored by Tim Peters's avatar Tim Peters

This test relied on significant trailing whitespace in a string literal.

Evil.
parent 959c7727
...@@ -43,7 +43,12 @@ class DisTests(unittest.TestCase): ...@@ -43,7 +43,12 @@ class DisTests(unittest.TestCase):
sys.stdout = s sys.stdout = s
dis.dis(_f) dis.dis(_f)
sys.stdout = save_stdout sys.stdout = save_stdout
self.assertEqual(dis_f, s.getvalue()) got = s.getvalue()
# Trim trailing blanks (if any).
lines = got.split('\n')
lines = [line.rstrip() for line in lines]
got = '\n'.join(lines)
self.assertEqual(dis_f, got)
def test_main(): def test_main():
run_unittest(DisTests) run_unittest(DisTests)
......
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