From f0013c75811cc481d920b59459470bfaf7971bc4 Mon Sep 17 00:00:00 2001 From: Tobi-wan Kenobi Date: Sat, 4 Mar 2017 11:35:46 +0100 Subject: [PATCH] [tests/util] Add test for execute with wait=False --- tests/test_util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_util.py b/tests/test_util.py index 0720e34..823605b 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -37,6 +37,12 @@ class TestUtil(unittest.TestCase): self.popen.mock.popen.assert_call(self.some_command_with_args) self.assertTrue(self.popen.mock.communicate.called) + def test_execute_nowait(self): + execute(self.some_command_with_args, False) + self.assertTrue(self.popen.mock.popen.called) + self.popen.mock.popen.assert_call(self.some_command_with_args) + self.assertFalse(self.popen.mock.communicate.called) + def test_execute_utf8(self): self.popen.mock.communicate.return_value = [ self.some_utf8, None ] self.test_execute()