fix test_process

This commit is contained in:
Kay0u 2020-01-02 01:02:47 +08:00
parent 315db8ac71
commit 064ff259bd
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -78,7 +78,7 @@ def test_call_async_output(test_file):
call_async_output(["cat", str(test_file)], callback) 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): def callback(a):
assert a == "foo\n" or a == "bar\n" assert a == "foo\n" or a == "bar\n"
@ -98,8 +98,9 @@ def test_call_async_output_kwargs(test_file):
callback = (callbackA, callbackB, callbackC) callback = (callbackA, callbackB, callbackC)
os.mkdir("/tmp/teststdinfo/") dirname = os.path.dirname(str(test_file))
call_async_output(["cat", str(test_file)], callback, stdinfo="/tmp/teststdinfo/teststdinfo") 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): def test_check_output(test_file):