summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kowalik <steve.kowalik@canonical.com>2014-08-22 12:51:01 +1000
committerSteve Kowalik <steve.kowalik@canonical.com>2014-08-22 12:51:01 +1000
commitbb2f668cab2e80bdd89b3fee0befc1683c3f956e (patch)
tree4f5732b2180278a3cbadcc65ce978ebb984a53ed
parent99783173a93b0e9705b4dd7f20af7c3337620e82 (diff)
downloadfixtures-bb2f668cab2e80bdd89b3fee0befc1683c3f956e.tar.gz
* ``FakeProcess`` wait() now supports arguments added in Python 3.
(Steve Kowalik)
-rw-r--r--NEWS2
-rw-r--r--lib/fixtures/_fixtures/popen.py2
-rw-r--r--lib/fixtures/tests/_fixtures/test_popen.py4
3 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index e34391d..0cc10dc 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ CHANGES
* ``FakePopen`` now supports being called under a context manager (IE: with).
(Steve Kowalik)
* ``FakeProcess`` now supports kill(). (Steve Kowalik)
+* ``FakeProcess`` wait() now supports arguments added in Python 3.
+ (Steve Kowalik)
0.3.14
~~~~~~
diff --git a/lib/fixtures/_fixtures/popen.py b/lib/fixtures/_fixtures/popen.py
index 67f20e3..728e980 100644
--- a/lib/fixtures/_fixtures/popen.py
+++ b/lib/fixtures/_fixtures/popen.py
@@ -57,7 +57,7 @@ class FakeProcess(object):
def kill(self):
pass
- def wait(self):
+ def wait(self, timeout=None, endtime=None):
if self.returncode is None:
self.communicate()
return self.returncode
diff --git a/lib/fixtures/tests/_fixtures/test_popen.py b/lib/fixtures/tests/_fixtures/test_popen.py
index 6d47291..98b762f 100644
--- a/lib/fixtures/tests/_fixtures/test_popen.py
+++ b/lib/fixtures/tests/_fixtures/test_popen.py
@@ -98,3 +98,7 @@ class TestFakeProcess(testtools.TestCase):
def test_kill(self):
proc = FakeProcess({}, {})
self.assertIs(None, proc.kill())
+
+ def test_wait_with_timeout_and_endtime(self):
+ proc = FakeProcess({}, {})
+ self.assertEqual(0 , proc.wait(timeout=4, endtime=7))