]> granicus.if.org Git - python/commit
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)
authorVictor Stinner <vstinner@redhat.com>
Wed, 20 Jun 2018 09:29:33 +0000 (11:29 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 09:29:33 +0000 (11:29 +0200)
commitfd8fbce495c32b0cbc13f71a8e9d4eec6f48c844
treef640fd19ae0816fe2bb9baf66174da3ccd2476a5
parent9bb92235f6272b28d59fcbd04f101fdc6b1bbc50
bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799)

Only make sure that the result is in unittest.signals._results, don't
check the full content of unittest.signals._results.

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

Call also removeResult() to restore unittest.signals._results to
avoid test side effect.
Lib/unittest/test/test_break.py
Misc/NEWS.d/next/Tests/2018-06-19-17-55-46.bpo-33746.Sz7avn.rst [new file with mode: 0644]