Skip to content

Commit

Permalink
some platform dependent fork hack
Browse files Browse the repository at this point in the history
  • Loading branch information
zrvku2000 committed Feb 3, 2025
1 parent 7addb68 commit 39dc597
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
else:
forked = pytest.mark.forked

if sys.platform == 'linux':
linux_forked = pytest.mark.forked
else:
def linux_forked(func):
return func

SIMPLE_APP = {
'app.py': """\
from aiohttp import web
Expand Down
3 changes: 2 additions & 1 deletion tests/test_runserver_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from aiohttp_devtools.runserver.watch import AppTask
import ssl

from .conftest import SIMPLE_APP, forked
from .conftest import SIMPLE_APP, forked, linux_forked


async def check_server_running(check_callback):
Expand Down Expand Up @@ -329,6 +329,7 @@ async def check_ssl_server_running(check_callback, sslcontext):


@pytest.mark.filterwarnings(r"ignore:unclosed:ResourceWarning")
@linux_forked
@pytest.mark.datafiles('tests/test_certs', keep_top_dir=True)
def test_start_runserver_ssl(datafiles, tmpworkdir, smart_caplog):
mktree(tmpworkdir, {
Expand Down

0 comments on commit 39dc597

Please sign in to comment.