Skip to content

bpo-33746: Fix test_unittest in verbose mode#7389

Closed
vstinner wants to merge 2 commits intopython:masterfrom
vstinner:unittest_verbose
Closed

bpo-33746: Fix test_unittest in verbose mode#7389
vstinner wants to merge 2 commits intopython:masterfrom
vstinner:unittest_verbose

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 4, 2018

Skip TestBreak.testRegisterResult() when run in verbose mode.

support._run_suite() uses TextTestRunner in verbose mode, but
TextTestRunner.run() calls registerResult(result) which makes the
test fail with "odd object in result set".

https://bugs.python.org/issue33746

Skip TestBreak.testRegisterResult() when run in verbose mode.

support._run_suite() uses TextTestRunner in verbose mode, but
TextTestRunner.run() calls registerResult(result) which makes the
test fail with "odd object in result set".
@serhiy-storchaka
Copy link
Member

I'm not sure about the purpose of this test.

Wouldn't be better to save the content of unittest.signals._results before calling unittest.registerResult() and check that unittest.registerResult(result) adds result and only it to this set?

@serhiy-storchaka
Copy link
Member

@voidspace

@vstinner
Copy link
Member Author

I merged master into my PR to reschedule CI jobs.

@vstinner
Copy link
Member Author

Wouldn't be better to save the content of unittest.signals._results before calling unittest.registerResult() and check that unittest.registerResult(result) adds result and only it to this set?

I created an alternative fix: PR #7389.

@vstinner
Copy link
Member Author

Abandonned, I will merge PR #7799 instead.

@vstinner vstinner closed this Jun 20, 2018
@vstinner vstinner deleted the unittest_verbose branch June 20, 2018 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants