From 2182f246ae7b802de1382e29c5c1944458bb70bf Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 6 Jun 2023 14:02:37 +0200 Subject: [PATCH] test refactor: remove redundant pytest.mark.asyncio --- integration-tests/test_admin_installer.py | 2 -- integration-tests/test_hub.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/integration-tests/test_admin_installer.py b/integration-tests/test_admin_installer.py index c968978..083cf17 100644 --- a/integration-tests/test_admin_installer.py +++ b/integration-tests/test_admin_installer.py @@ -5,7 +5,6 @@ from hubtraf.auth.dummy import login_dummy from hubtraf.user import User -@pytest.mark.asyncio async def test_admin_login(): """ Test if the admin that was added during install can login with @@ -21,7 +20,6 @@ async def test_admin_login(): await u.ensure_server_simulate() -@pytest.mark.asyncio @pytest.mark.parametrize( "username, password", [ diff --git a/integration-tests/test_hub.py b/integration-tests/test_hub.py index faba9ea..7ea9ade 100644 --- a/integration-tests/test_hub.py +++ b/integration-tests/test_hub.py @@ -36,7 +36,6 @@ def test_hub_version(): assert V("4") <= V(info["version"]) <= V("5") -@pytest.mark.asyncio async def test_user_code_execute(): """ User logs in, starts a server & executes code @@ -68,7 +67,6 @@ async def test_user_code_execute(): assert pwd.getpwnam(f"jupyter-{username}") is not None -@pytest.mark.asyncio async def test_user_server_started_with_custom_base_url(): """ User logs in, starts a server with a custom base_url & executes code @@ -123,7 +121,6 @@ async def test_user_server_started_with_custom_base_url(): ) -@pytest.mark.asyncio async def test_user_admin_add(): """ User is made an admin, logs in and we check if they are in admin group @@ -168,7 +165,6 @@ async def test_user_admin_add(): # FIXME: Make this test pass -@pytest.mark.asyncio @pytest.mark.xfail(reason="Unclear why this is failing") async def test_user_admin_remove(): """ @@ -236,7 +232,6 @@ async def test_user_admin_remove(): assert f"jupyter-{username}" not in grp.getgrnam("jupyterhub-admins").gr_mem -@pytest.mark.asyncio async def test_long_username(): """ User with a long name logs in, and we check if their name is properly truncated. @@ -277,7 +272,6 @@ async def test_long_username(): raise -@pytest.mark.asyncio async def test_user_group_adding(): """ User logs in, and we check if they are added to the specified group. @@ -337,7 +331,6 @@ async def test_user_group_adding(): raise -@pytest.mark.asyncio async def test_idle_server_culled(): """ User logs in, starts a server & stays idle for 1 min. @@ -460,7 +453,6 @@ async def test_idle_server_culled(): ) -@pytest.mark.asyncio async def test_active_server_not_culled(): """ User logs in, starts a server & stays idle for 30s