Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52bc2e7

Browse filesBrowse files
authored
pythongh-48330: assert warning is emitted on unittest.TestResult with no addDuration (python#103309)
1 parent 482b6ee commit 52bc2e7
Copy full SHA for 52bc2e7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎Lib/test/test_unittest/test_case.py

Copy file name to clipboardExpand all lines: Lib/test/test_unittest/test_case.py
+2-1Lines changed: 2 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.