Issue26837
Created on 2016-04-24 15:32 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| unittest_assert_bytes_warning.patch | serhiy.storchaka, 2016-04-24 15:32 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg264110 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-04-24 15:32 | |
assertSequenceEqual() raises BytesWarning when format failure report. See for example http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/10575/steps/test/logs/stdio : ====================================================================== ERROR: test_close_fds_0_1 (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_subprocess.py", line 1741, in test_close_fds_0_1 self.check_close_std_fds([0, 1]) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_subprocess.py", line 1727, in check_close_std_fds self.assertEqual((out, err), (b'apple', b'orange')) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/unittest/case.py", line 820, in assertEqual assertion_func(first, second, msg=msg) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/unittest/case.py", line 1029, in assertTupleEqual self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple) File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/unittest/case.py", line 967, in assertSequenceEqual (i, item1, item2)) BytesWarning: str() on a bytes instance ====================================================================== Proposed patch fixes message formatting and adds tests for assertions that can emit BytesWarning. |
|||
| msg264137 - (view) | Author: Martin Panter (martin.panter) * | Date: 2016-04-25 00:44 | |
I think the change is good in spirit, especially using repr() and limiting the size. See the review for a couple problems. |
|||
| msg264154 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-04-25 06:00 | |
New changeset ae5cc8ab664a by Serhiy Storchaka in branch '3.5': Issue #26837: assertSequenceEqual() now correctly outputs non-stringified https://hg.python.org/cpython/rev/ae5cc8ab664a New changeset d0d541c2afb7 by Serhiy Storchaka in branch '2.7': Issue #26837: assertSequenceEqual() now correctly outputs non-stringified https://hg.python.org/cpython/rev/d0d541c2afb7 |
|||
| msg264155 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-04-25 06:01 | |
Thank you for your helpful review Martin! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:30 | admin | set | github: 71024 |
| 2016-06-23 19:38:10 | skrah | link | issue27375 superseder |
| 2016-04-25 06:01:04 | serhiy.storchaka | set | status: open -> closed messages: + msg264155 assignee: serhiy.storchaka |
| 2016-04-25 06:00:21 | python-dev | set | nosy:
+ python-dev messages: + msg264154 |
| 2016-04-25 00:44:57 | martin.panter | set | nosy:
+ martin.panter messages:
+ msg264137 |
| 2016-04-24 15:32:26 | serhiy.storchaka | create | |