Skip to content

bpo-33746: Fix test_unittest in verbose mode #7389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Lib/unittest/test/test_break.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import weakref

import unittest
from test import support


@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
Expand Down Expand Up @@ -38,6 +39,12 @@ def testInstallHandler(self):
self.assertTrue(unittest.signals._interrupt_handler.called)

def testRegisterResult(self):
if support.verbose:
# support._run_suite() uses TextTestRunner in verbose mode,
# but TextTestRunner.run() calls registerResult(result) which
# make this test fail with "odd object in result set".
self.skipTest("cannot test in verbose mode")

result = unittest.TestResult()
unittest.registerResult(result)

Expand Down