mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-14 23:37:16 +00:00
Fix relative path problem
This commit is contained in:
parent
38eec06b4d
commit
0a218c8d6d
@ -1,8 +1,8 @@
|
|||||||
# pylint: disable=redefined-outer-name
|
# pylint: disable=redefined-outer-name
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from os import mkfifo
|
from os import chdir, mkfifo
|
||||||
from os.path import join
|
from os.path import dirname, join, realpath
|
||||||
from signal import SIGINT
|
from signal import SIGINT
|
||||||
from subprocess import DEVNULL, Popen, PIPE
|
from subprocess import DEVNULL, Popen, PIPE
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
@ -35,6 +35,7 @@ class CounterContext:
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def context():
|
def context():
|
||||||
with TemporaryDirectory() as workdir:
|
with TemporaryDirectory() as workdir:
|
||||||
|
chdir(dirname(realpath(__file__)))
|
||||||
pipepath = join(workdir, 'test.pipe')
|
pipepath = join(workdir, 'test.pipe')
|
||||||
mkfifo(pipepath)
|
mkfifo(pipepath)
|
||||||
yield CounterContext(join(workdir, 'test.lock'), pipepath)
|
yield CounterContext(join(workdir, 'test.lock'), pipepath)
|
||||||
|
Loading…
Reference in New Issue
Block a user