diff options
Diffstat (limited to 'systemd/test/test_daemon.py')
| -rw-r--r-- | systemd/test/test_daemon.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/systemd/test/test_daemon.py b/systemd/test/test_daemon.py index 96c5717..c048929 100644 --- a/systemd/test/test_daemon.py +++ b/systemd/test/test_daemon.py @@ -1,10 +1,18 @@ import sys import os import posix -from systemd.daemon import _is_fifo, is_fifo, listen_fds +from systemd.daemon import _is_fifo, is_fifo, listen_fds, booted import pytest +def test_booted(): + if os.path.exists('/run/systemd'): + # assume we are running under systemd + assert booted() + else: + # don't assume anything + assert booted() in {False, True} + def test__is_fifo(tmpdir): path = tmpdir.join('test.fifo').strpath posix.mkfifo(path) |
