Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2ffe29 + 48c8830 commit c75abffCopy full SHA for c75abff
1 file changed
Lib/test/test_coroutines.py
@@ -1568,10 +1568,11 @@ async def func(): pass
1568
def test_fatal_coro_warning(self):
1569
# Issue 27811
1570
async def func(): pass
1571
- with warnings.catch_warnings():
+ with warnings.catch_warnings(), support.captured_stderr() as stderr:
1572
warnings.filterwarnings("error")
1573
func()
1574
support.gc_collect()
1575
+ self.assertIn("was never awaited", stderr.getvalue())
1576
1577
1578
class CoroAsyncIOCompatTest(unittest.TestCase):
0 commit comments