Skip to content

Commit

Permalink
Fix test case to work on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Sep 17, 2024
1 parent 1c99710 commit 09c8f44
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
class TestSubprocess(unittest.TestCase):

def test_expected_output(self):
p = Subprocess("python3", "--help")
p.start(expected_output="Other environment variables", timeout=1)
p = Subprocess("python3", "-c", "print('Hello, World!')")
p.start(expected_output="Hello, World!", timeout=1)
p.terminate()

def test_expected_output_timeout(self):
p = Subprocess("python3", "--help")
p = Subprocess("python3", "--version")
with self.assertRaises(TimeoutError):
p.start(expected_output="Non-existing output 1234", timeout=1)
p.start(expected_output="Python 1.0.0", timeout=1)
p.terminate()


Expand Down

0 comments on commit 09c8f44

Please sign in to comment.