Skip to content

test_create_subprocess_with_pidfd in test_asyncio.test_subprocess is not independent #109862

Closed

Description

@serhiy-storchaka

Bug report

Bug description:

$ ./python -m test -v test_asyncio.test_subprocess -m test_create_subprocess_with_pidfd
...
test_create_subprocess_with_pidfd (test.test_asyncio.test_subprocess.GenericWatcherTests.test_create_subprocess_with_pidfd) ... /home/serhiy/py/cpython/Lib/test/test_asyncio/test_subprocess.py:980: DeprecationWarning: There is no current event loop
  asyncio.get_event_loop_policy().get_event_loop()
FAIL

======================================================================
FAIL: test_create_subprocess_with_pidfd (test.test_asyncio.test_subprocess.GenericWatcherTests.test_create_subprocess_with_pidfd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_subprocess.py", line 986, in test_create_subprocess_with_pidfd
    returncode, stdout = runner.run(main())
                         ^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_subprocess.py", line 979, in main
    with self.assertRaises(RuntimeError):
AssertionError: RuntimeError not raised

Note also a deprecation warning (you need to scroll horizontally to see it):

.../Lib/test/test_asyncio/test_subprocess.py:980: DeprecationWarning: There is no current event loop

CPython versions tested on:

3.12, CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. added
    type-bug
    tests
    3.12
    3.13
    on Sep 25, 2023
  2. added 2 commits that reference this issue on Jan 12, 2024
  3. added a commit that references this issue on Jan 15, 2024
  4. moved this from Todo to Done in asyncioon Jan 15, 2024
  5. added a commit that references this issue on Jan 15, 2024
  6. added a commit that references this issue on Jan 22, 2024
  7. added a commit that references this issue on Feb 11, 2024
  8. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.123.13teststopic-asynciotype-bug

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions