Skip to content

Commit 04dce89

Browse files
pfalconpi-anl
authored andcommitted
unittest: Add dummy TestCase.assertWarns() context manager.
Signed-off-by: Paul Sokolovsky <[email protected]>
1 parent 555f28c commit 04dce89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python-stdlib/unittest/unittest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def assertRaises(self, exc, func=None, *args, **kwargs):
161161

162162
assert False, "%r not raised" % exc
163163

164+
def assertWarns(self, warn):
165+
return NullContext()
166+
164167

165168
def skip(msg):
166169
def _decor(fun):

0 commit comments

Comments
 (0)