Skip to content

Commit 52bc2e7

Browse files
authored
gh-48330: assert warning is emitted on unittest.TestResult with no addDuration (#103309)
1 parent 482b6ee commit 52bc2e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_unittest/test_case.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ def defaultTestResult(self):
304304
def test(self):
305305
pass
306306

307-
Foo('test').run()
307+
with self.assertWarns(RuntimeWarning):
308+
Foo('test').run()
308309

309310
def test_deprecation_of_return_val_from_test(self):
310311
# Issue 41322 - deprecate return of value that is not None from a test

0 commit comments

Comments
 (0)