Skip to content

Commit

Permalink
test: Removed test with obsolete "forbid_global_loop".
Browse files Browse the repository at this point in the history
forbid_global_loop was an option to pytest.mark.asyncio which was removed in v0.6.0. The two subprocess tests are otherwise identical. Therefore, one of the tests was removed along with the obsolete option.

Signed-off-by: Michael Seifert <[email protected]>
  • Loading branch information
seifertm committed Mar 11, 2022
1 parent aad0316 commit ee1ed00
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@ def event_loop():
loop.close()


@pytest.mark.asyncio(forbid_global_loop=False)
@pytest.mark.asyncio
async def test_subprocess(event_loop):
"""Starting a subprocess should be possible."""
proc = await asyncio.subprocess.create_subprocess_exec(
sys.executable, "--version", stdout=asyncio.subprocess.PIPE
)
await proc.communicate()


@pytest.mark.asyncio(forbid_global_loop=True)
async def test_subprocess_forbid(event_loop):
"""Starting a subprocess should be possible."""
proc = await asyncio.subprocess.create_subprocess_exec(
sys.executable, "--version", stdout=asyncio.subprocess.PIPE
)
await proc.communicate()

0 comments on commit ee1ed00

Please sign in to comment.