https://github.com/python/cpython/commit/cb72feb8a30edb448bc8dc31330ed7420279d7c2
commit: cb72feb8a30edb448bc8dc31330ed7420279d7c2
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-01-12T12:22:43+02:00
summary:
gh-128729: Fix RuntimeWarning in test_unittest (GH-128730)
files:
M Lib/test/test_unittest/test_case.py
diff --git a/Lib/test/test_unittest/test_case.py
b/Lib/test/test_unittest/test_case.py
index b4b2194a09cf9f..621f8269a177ce 100644
--- a/Lib/test/test_unittest/test_case.py
+++ b/Lib/test/test_unittest/test_case.py
@@ -347,7 +347,10 @@ async def test1(self):
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__)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]