summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2025-01-12 10:22:43 (GMT)
committerGitHub <noreply@github.com>2025-01-12 10:22:43 (GMT)
commitcb72feb8a30edb448bc8dc31330ed7420279d7c2 (patch)
tree3d08c5fa60020ecbea3252e6f23089b2747b2b0b /Lib/test
parent30268b5d2fbb1a5e6c876f0cdc4cbdb5d93315e6 (diff)
downloadcpython-cb72feb8a30edb448bc8dc31330ed7420279d7c2.zip
cpython-cb72feb8a30edb448bc8dc31330ed7420279d7c2.tar.gz
cpython-cb72feb8a30edb448bc8dc31330ed7420279d7c2.tar.bz2
gh-128729: Fix RuntimeWarning in test_unittest (GH-128730)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_unittest/test_case.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_unittest/test_case.py b/Lib/test/test_unittest/test_case.py
index b4b2194..621f826 100644
--- a/Lib/test/test_unittest/test_case.py
+++ b/Lib/test/test_unittest/test_case.py
@@ -347,7 +347,10 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
return 1
with self.assertWarns(DeprecationWarning) as w:
+ warnings.filterwarnings('ignore',
+ 'coroutine .* was never awaited', RuntimeWarning)
Foo('test1').run()
+ support.gc_collect()
self.assertIn('It is deprecated to return a value that is not None', str(w.warning))
self.assertIn('test1', str(w.warning))
self.assertEqual(w.filename, __file__)