|
@@ -1,3 +1,4 @@
|
|
|
+import pathlib
|
|
|
import shutil
|
|
|
import subprocess
|
|
|
|
|
@@ -7,15 +8,15 @@ import tooncher
|
|
|
|
|
|
|
|
|
def test_start_engine():
|
|
|
- p = tooncher.start_engine(
|
|
|
- engine_path=shutil.which("printenv"),
|
|
|
+ process = tooncher.start_engine(
|
|
|
+ engine_path=pathlib.Path(shutil.which("printenv")),
|
|
|
gameserver="gameserver",
|
|
|
playcookie="cookie",
|
|
|
stdout=subprocess.PIPE,
|
|
|
stderr=subprocess.PIPE,
|
|
|
)
|
|
|
- assert isinstance(p, subprocess.Popen)
|
|
|
- stdout, stderr = p.communicate()
|
|
|
+ assert isinstance(process, subprocess.Popen)
|
|
|
+ stdout, stderr = process.communicate()
|
|
|
assert b"" == stderr
|
|
|
env = stdout.strip().split(b"\n")
|
|
|
assert b"TTR_GAMESERVER=gameserver" in env
|