Merge lp:~stevenk/python-fixtures/fakeprocess-wait-args into lp:~python-fixtures/python-fixtures/trunk

Proposed by Steve Kowalik
Status: Merged
Merged at revision: 79
Proposed branch: lp:~stevenk/python-fixtures/fakeprocess-wait-args
Merge into: lp:~python-fixtures/python-fixtures/trunk
Prerequisite: lp:~stevenk/python-fixtures/fakeprocess-kill
Diff against target: 37 lines (+7/-1)
3 files modified
NEWS (+2/-0)
lib/fixtures/_fixtures/popen.py (+1/-1)
lib/fixtures/tests/_fixtures/test_popen.py (+4/-0)
To merge this branch: bzr merge lp:~stevenk/python-fixtures/fakeprocess-wait-args
Reviewer Review Type Date Requested Status
python-fixtures committers Pending
Review via email: mp+231297@code.launchpad.net

Description of the change

Python 3 added two optional arguments to subprocess.wait(), timeout and endtime, so FakeProcess's wait() should support them.

To post a comment you must log in.
78. By Steve Kowalik

  * ``FakeProcess`` wait() now supports arguments added in Python 3.
      (Steve Kowalik)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2014-08-22 02:46:10 +0000
+++ NEWS 2014-08-22 02:53:13 +0000
@@ -13,6 +13,8 @@
13 (Steve Kowalik)13 (Steve Kowalik)
1414
15* ``FakeProcess`` now supports kill(). (Steve Kowalik)15* ``FakeProcess`` now supports kill(). (Steve Kowalik)
16* ``FakeProcess`` wait() now supports arguments added in Python 3.
17 (Steve Kowalik)
1618
17* ``MonkeyPatch`` now preserves ``staticmethod`` functions.19* ``MonkeyPatch`` now preserves ``staticmethod`` functions.
18 (Dan Kenigsberg)20 (Dan Kenigsberg)
1921
=== modified file 'lib/fixtures/_fixtures/popen.py'
--- lib/fixtures/_fixtures/popen.py 2014-08-19 04:40:33 +0000
+++ lib/fixtures/_fixtures/popen.py 2014-08-22 02:53:13 +0000
@@ -57,7 +57,7 @@
57 def kill(self):57 def kill(self):
58 pass58 pass
5959
60 def wait(self):60 def wait(self, timeout=None, endtime=None):
61 if self.returncode is None:61 if self.returncode is None:
62 self.communicate()62 self.communicate()
63 return self.returncode63 return self.returncode
6464
=== modified file 'lib/fixtures/tests/_fixtures/test_popen.py'
--- lib/fixtures/tests/_fixtures/test_popen.py 2014-08-19 04:40:33 +0000
+++ lib/fixtures/tests/_fixtures/test_popen.py 2014-08-22 02:53:13 +0000
@@ -98,3 +98,7 @@
98 def test_kill(self):98 def test_kill(self):
99 proc = FakeProcess({}, {})99 proc = FakeProcess({}, {})
100 self.assertIs(None, proc.kill())100 self.assertIs(None, proc.kill())
101
102 def test_wait_with_timeout_and_endtime(self):
103 proc = FakeProcess({}, {})
104 self.assertEqual(0 , proc.wait(timeout=4, endtime=7))

Subscribers

People subscribed via source and target branches