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

bpo-33746: Fix test_unittest in verbose mode #7389

wants to merge 2 commits into from

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