Skip to content

Commit

Permalink
Use assertEqual() in test_workertrial to fix PyPy3
Browse files Browse the repository at this point in the history
Use assertEqual() rather than assertIdentical() to compare strings
in twisted.trial._dist.test.test_workertrial to fix the test failure
on PyPy3.

Fixes: ticket:10302
  • Loading branch information
mgorny committed Feb 1, 2022
1 parent 171fd5c commit 8e078f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/twisted/trial/_dist/test/test_workertrial.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def fdopen(self, fd, mode=None):
the stdin fd and C{self.writeStream} for the stdout fd.
"""
if fd == _WORKER_AMP_STDIN:
self.assertIdentical("rb", mode)
self.assertEqual("rb", mode)
return self.readStream
elif fd == _WORKER_AMP_STDOUT:
self.assertEqual("wb", mode)
Expand Down
1 change: 1 addition & 0 deletions src/twisted/trial/newsfragments/10302.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_dist.test.test_workertrial now correctly compare strings via assertEqual() and pass on PyPy3

0 comments on commit 8e078f5

Please sign in to comment.