summaryrefslogtreecommitdiffstats
path: root/tests/units/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/client.py')
-rw-r--r--tests/units/client.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/units/client.py b/tests/units/client.py
new file mode 100644
index 0000000..4e780a7
--- /dev/null
+++ b/tests/units/client.py
@@ -0,0 +1,17 @@
+import subprocess
+import os
+
+class Client():
+
+ def __init__(self):
+ self.null = open(os.devnull, 'wb')
+ self.proc = subprocess.Popen(['python3', 'main.py'],
+ cwd='../',
+ stdout=self.null,
+ stderr=self.null)
+
+ def stop(self):
+ self.proc.terminate()
+ self.proc.kill()
+ self.proc.wait()
+ self.null.close()