mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
gh-127221: Add colour to unittest output (#127223)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
d958d9f4a1
commit
23f2e8f13c
15 changed files with 136 additions and 60 deletions
|
@ -1,5 +1,6 @@
|
|||
import unittest
|
||||
|
||||
from test.support import force_not_colorized
|
||||
from test.test_unittest.support import LoggingResult
|
||||
|
||||
|
||||
|
@ -293,6 +294,7 @@ class Test_TestSkipping(unittest.TestCase):
|
|||
self.assertFalse(result.unexpectedSuccesses)
|
||||
self.assertTrue(result.wasSuccessful())
|
||||
|
||||
@force_not_colorized
|
||||
def test_expected_failure_and_fail_in_cleanup(self):
|
||||
class Foo(unittest.TestCase):
|
||||
@unittest.expectedFailure
|
||||
|
@ -372,6 +374,7 @@ class Test_TestSkipping(unittest.TestCase):
|
|||
self.assertEqual(result.unexpectedSuccesses, [test])
|
||||
self.assertFalse(result.wasSuccessful())
|
||||
|
||||
@force_not_colorized
|
||||
def test_unexpected_success_and_fail_in_cleanup(self):
|
||||
class Foo(unittest.TestCase):
|
||||
@unittest.expectedFailure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue