mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #19594: Use specific asserts in unittest tests.
This commit is contained in:
parent
7c5e24f948
commit
5665bc5980
7 changed files with 28 additions and 28 deletions
|
@ -176,7 +176,7 @@ class Test_TestResult(unittest.TestCase):
|
|||
self.assertEqual(result.shouldStop, False)
|
||||
|
||||
test_case, formatted_exc = result.failures[0]
|
||||
self.assertTrue(test_case is test)
|
||||
self.assertIs(test_case, test)
|
||||
self.assertIsInstance(formatted_exc, str)
|
||||
|
||||
# "addError(test, err)"
|
||||
|
@ -224,7 +224,7 @@ class Test_TestResult(unittest.TestCase):
|
|||
self.assertEqual(result.shouldStop, False)
|
||||
|
||||
test_case, formatted_exc = result.errors[0]
|
||||
self.assertTrue(test_case is test)
|
||||
self.assertIs(test_case, test)
|
||||
self.assertIsInstance(formatted_exc, str)
|
||||
|
||||
def testGetDescriptionWithoutDocstring(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue