diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-04-06 13:05:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 13:05:23 (GMT) |
commit | 52bc2e7b9d451821513a580a9b73c20cfdcf2b21 (patch) | |
tree | edf0d053510fce669ab45c723a2debb26463f62e /Lib/test | |
parent | 482b6eeadcde3e6573f0d243e687de7be7680379 (diff) | |
download | cpython-52bc2e7b9d451821513a580a9b73c20cfdcf2b21.zip cpython-52bc2e7b9d451821513a580a9b73c20cfdcf2b21.tar.gz cpython-52bc2e7b9d451821513a580a9b73c20cfdcf2b21.tar.bz2 |
gh-48330: assert warning is emitted on unittest.TestResult with no addDuration (#103309)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_unittest/test_case.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_unittest/test_case.py b/Lib/test/test_unittest/test_case.py index 05d60a8..dd5ff6d 100644 --- a/Lib/test/test_unittest/test_case.py +++ b/Lib/test/test_unittest/test_case.py @@ -304,7 +304,8 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing): def test(self): pass - Foo('test').run() + with self.assertWarns(RuntimeWarning): + Foo('test').run() def test_deprecation_of_return_val_from_test(self): # Issue 41322 - deprecate return of value that is not None from a test |