mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
asyncio: sync with Tulip
- Python issue 21163: Fix more "Task was destroyed but it is pending!" logs in tests - Add test to check that run_until_complete() checks the loop of the future
This commit is contained in:
parent
87f16f892c
commit
7ba4061098
2 changed files with 9 additions and 0 deletions
|
|
@ -288,6 +288,12 @@ class BaseEventLoopTests(test_utils.TestCase):
|
|||
self.assertRaises(TypeError,
|
||||
self.loop.run_until_complete, 'blah')
|
||||
|
||||
def test_run_until_complete_loop(self):
|
||||
task = asyncio.Future(loop=self.loop)
|
||||
other_loop = self.new_test_loop()
|
||||
self.assertRaises(ValueError,
|
||||
other_loop.run_until_complete, task)
|
||||
|
||||
def test_subprocess_exec_invalid_args(self):
|
||||
args = [sys.executable, '-c', 'pass']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue