Skip to content

Commit

Permalink
gh-48330: assert warning is emitted on unittest.TestResult with no ad…
Browse files Browse the repository at this point in the history
…dDuration (#103309)
  • Loading branch information
iritkatriel committed Apr 6, 2023
1 parent 482b6ee commit 52bc2e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_unittest/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ def defaultTestResult(self):
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
Expand Down

0 comments on commit 52bc2e7

Please sign in to comment.