From 20612396729a7cc38c6c81fd38467c121083f5ea Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 10 Apr 2018 00:45:59 +0000 Subject: [PATCH] Check the exit code. --- tests/helpers/editor.py | 4 ++++ tests/system_tests/test_main.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/helpers/editor.py b/tests/helpers/editor.py index ae7bd699..ceae72d9 100644 --- a/tests/helpers/editor.py +++ b/tests/helpers/editor.py @@ -272,6 +272,10 @@ class DebugAdapter(Closeable): self._output = self._proc.stdout.read() return self._output + @property + def returncode(self): + return self._proc.returncode + def attach(self, **kwargs): if self._session is not None: raise RuntimeError('already attached') diff --git a/tests/system_tests/test_main.py b/tests/system_tests/test_main.py index 202ab393..e6dad2b4 100644 --- a/tests/system_tests/test_main.py +++ b/tests/system_tests/test_main.py @@ -119,5 +119,7 @@ class LifecycleTests(TestsBase, unittest.TestCase): lifecycle_handshake(session, 'launch') adapter.wait() out = adapter.output.decode('utf-8') + rc = adapter.returncode self.assertIn('done', out.splitlines()) + self.assertEqual(rc, 0)