From 064ff259bdb44b9489afafab9352ab63802cbbaa Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 2 Jan 2020 01:02:47 +0800 Subject: [PATCH] fix test_process --- test/test_process.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test_process.py b/test/test_process.py index e92dc747..93034d80 100644 --- a/test/test_process.py +++ b/test/test_process.py @@ -78,7 +78,7 @@ def test_call_async_output(test_file): call_async_output(["cat", str(test_file)], callback) -def test_call_async_output_kwargs(test_file): +def test_call_async_output_kwargs(test_file, mocker): def callback(a): assert a == "foo\n" or a == "bar\n" @@ -98,8 +98,9 @@ def test_call_async_output_kwargs(test_file): callback = (callbackA, callbackB, callbackC) - os.mkdir("/tmp/teststdinfo/") - call_async_output(["cat", str(test_file)], callback, stdinfo="/tmp/teststdinfo/teststdinfo") + dirname = os.path.dirname(str(test_file)) + os.mkdir(os.path.join(dirname, "teststdinfo")) + call_async_output(["cat", str(test_file)], callback, stdinfo=os.path.join(dirname, "teststdinfo", "teststdinfo")) def test_check_output(test_file):