Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove no longer needed pytest.mark.asyncio #119

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions tests/test_systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
import tempfile
import time

import pytest

from systemdspawner import systemd


@pytest.mark.asyncio
async def test_simple_start():
unit_name = "systemdspawner-unittest-" + str(time.time())
await systemd.start_transient_service(
Expand All @@ -27,7 +24,6 @@ async def test_simple_start():
assert not await systemd.service_running(unit_name)


@pytest.mark.asyncio
async def test_service_failed_reset():
"""
Test service_failed and reset_service
Expand All @@ -50,7 +46,6 @@ async def test_service_failed_reset():
assert not await systemd.service_failed(unit_name)


@pytest.mark.asyncio
async def test_service_running_fail():
"""
Test service_running failing when there's no service.
Expand All @@ -60,7 +55,6 @@ async def test_service_running_fail():
assert not await systemd.service_running(unit_name)


@pytest.mark.asyncio
async def test_env_setting():
unit_name = "systemdspawner-unittest-" + str(time.time())
with tempfile.TemporaryDirectory() as d:
Expand Down Expand Up @@ -102,7 +96,6 @@ async def test_env_setting():
assert not os.path.exists(env_file)


@pytest.mark.asyncio
async def test_workdir():
unit_name = "systemdspawner-unittest-" + str(time.time())
_, env_filename = tempfile.mkstemp()
Expand All @@ -122,7 +115,6 @@ async def test_workdir():
assert text == d


@pytest.mark.asyncio
async def test_slice():
unit_name = "systemdspawner-unittest-" + str(time.time())
_, env_filename = tempfile.mkstemp()
Expand All @@ -148,7 +140,6 @@ async def test_slice():
assert b"user.slice" in stdout


@pytest.mark.asyncio
async def test_properties_string():
"""
Test that setting string properties works
Expand Down Expand Up @@ -178,7 +169,6 @@ async def test_properties_string():
assert text == "/bind-test"


@pytest.mark.asyncio
async def test_properties_list():
"""
Test setting multiple values for a property
Expand Down Expand Up @@ -215,7 +205,6 @@ async def test_properties_list():
assert text == d


@pytest.mark.asyncio
async def test_uid_gid():
"""
Test setting uid and gid
Expand Down