Skip to content

Commit

Permalink
Fix twisted.test.test_defer.DeferredTests.test_inlineCallbacksTraceba…
Browse files Browse the repository at this point in the history
…cks failure

Resolve this test failure:

    Traceback (most recent call last):
      File "/home/twm/dev/twisted/build/nocov/lib/python3.6/site-packages/twisted/test/test_defer.py", line 1424, in test_inlineCallbacksTracebacks
        self.assertEqual("1/0", tb[2][3])
      File "/home/twm/dev/twisted/build/nocov/lib/python3.6/site-packages/twisted/trial/_synctest.py", line 424, in assertEqual
        super(_Assertions, self).assertEqual(first, second, msg)
      File "/usr/lib/python3.6/unittest/case.py", line 829, in assertEqual
        assertion_func(first, second, msg=msg)
      File "/usr/lib/python3.6/unittest/case.py", line 1203, in assertMultiLineEqual
        self.fail(self._formatMessage(msg, standardMsg))
    twisted.trial.unittest.FailTest: '1/0' != '1 / 0'
    - 1/0
    + 1 / 0
    ?  + +

Black added whitespace around the division operator. Update the
assertion to match.
  • Loading branch information
twm committed Sep 13, 2020
1 parent 2311807 commit 6faa2db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/twisted/test/test_defer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ def ic(d):
self.assertEqual(len(tb), 3)
self.assertIn("test_defer", tb[2][0])
self.assertEqual("getDivisionFailure", tb[2][2])
self.assertEqual("1/0", tb[2][3])
self.assertEqual("1 / 0", tb[2][3])

self.assertIn("test_defer", tb[0][0])
self.assertEqual("test_inlineCallbacksTracebacks", tb[0][2])
Expand Down

0 comments on commit 6faa2db

Please sign in to comment.