Don't show starting process in tests

This commit is contained in:
Jake Howard 2018-12-14 22:43:20 +00:00
parent 73328303d4
commit b184038cc4
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -31,11 +31,19 @@ class BaseWorkerTestCase(BaseTestCase):
super().setUp() super().setUp()
self.unused_port = unused_port() self.unused_port = unused_port()
result = subprocess.run( result = subprocess.run(
[shutil.which("ctf"), "start", "--port", str(self.unused_port)] [shutil.which("ctf"), "start", "--port", str(self.unused_port)],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,
) )
self.assertEqual(result.returncode, 0) self.assertEqual(result.returncode, 0, result.stdout)
def tearDown(self): def tearDown(self):
result = subprocess.run([shutil.which("ctf"), "stop"]) result = subprocess.run(
self.assertEqual(result.returncode, 0) [shutil.which("ctf"), "stop"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,
)
self.assertEqual(result.returncode, 0, result.stdout)
super().tearDown() super().tearDown()