classification
Title: testRegisterResult in test_unittest fails in verbose mode
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, miss-islington, rbcollins, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2018-06-03 11:33 by serhiy.storchaka, last changed 2018-06-20 10:04 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7389 closed vstinner, 2018-06-04 09:34
PR 7799 merged vstinner, 2018-06-19 15:56
PR 7820 merged miss-islington, 2018-06-20 09:30
PR 7821 merged miss-islington, 2018-06-20 09:31
Messages (6)
msg318533 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-06-03 11:33
$ ./python -m test -m testRegisterResult test_unittest
Run tests sequentially
0:00:00 load avg: 4.42 [1/1] test_unittest

== Tests result: SUCCESS ==

1 test OK.

Total duration: 98 ms
Tests result: SUCCESS

$ ./python -m test -v -m testRegisterResult test_unittest
== CPython 3.8.0a0 (heads/master-dirty:a801cf164b, Jun 3 2018, 12:58:45) [GCC 7.3.0]
== Linux-4.15.0-22-generic-x86_64-with-glibc2.9 little-endian
== cwd: /home/serhiy/py/cpython/build/test_python_3610
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 4.17 [1/1] test_unittest
testRegisterResult (unittest.test.test_break.TestBreak) ... FAIL
testRegisterResult (unittest.test.test_break.TestBreakDefaultIntHandler) ... ok
testRegisterResult (unittest.test.test_break.TestBreakSignalDefault) ... ok
testRegisterResult (unittest.test.test_break.TestBreakSignalIgnored) ... ok

======================================================================
FAIL: testRegisterResult (unittest.test.test_break.TestBreak)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/unittest/test/test_break.py", line 48, in testRegisterResult
    self.fail("odd object in result set")
AssertionError: odd object in result set

----------------------------------------------------------------------
Ran 4 tests in 0.002s

FAILED (failures=1)
test test_unittest failed
test_unittest failed

== Tests result: FAILURE ==

1 test failed:
    test_unittest

Total duration: 138 ms
Tests result: FAILURE


The test is passed in 2.7 and 3.4. It fails only starting from 3.5.
msg320040 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-20 09:29
New changeset fd8fbce495c32b0cbc13f71a8e9d4eec6f48c844 by Victor Stinner in branch 'master':
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)
https://github.com/python/cpython/commit/fd8fbce495c32b0cbc13f71a8e9d4eec6f48c844
msg320041 - (view) Author: miss-islington (miss-islington) Date: 2018-06-20 09:50
New changeset 232add02418f0b061881501e4f2d1241a2404f5d by Miss Islington (bot) in branch '3.7':
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)
https://github.com/python/cpython/commit/232add02418f0b061881501e4f2d1241a2404f5d
msg320042 - (view) Author: miss-islington (miss-islington) Date: 2018-06-20 09:54
New changeset 2b7574213987ddcbc5e83c6798668c7d600b6608 by Miss Islington (bot) in branch '3.6':
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)
https://github.com/python/cpython/commit/2b7574213987ddcbc5e83c6798668c7d600b6608
msg320047 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-20 10:03
I tested manually: "./python -m test -v test_unittest" pass in 2.7, 3.6, 3.7 and master.
msg320048 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-06-20 10:04
Thanks Victor!
History
Date User Action Args
2018-06-20 10:04:16serhiy.storchakasetmessages: + msg320048
2018-06-20 10:03:25vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg320047

stage: patch review -> resolved
2018-06-20 09:54:34miss-islingtonsetmessages: + msg320042
2018-06-20 09:50:11miss-islingtonsetnosy: + miss-islington
messages: + msg320041
2018-06-20 09:31:43miss-islingtonsetpull_requests: + pull_request7429
2018-06-20 09:30:52miss-islingtonsetpull_requests: + pull_request7428
2018-06-20 09:29:41vstinnersetmessages: + msg320040
2018-06-19 15:56:47vstinnersetpull_requests: + pull_request7402
2018-06-04 09:34:21vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7015
2018-06-03 11:33:27serhiy.storchakacreate