diff options
author | Robert Collins <robertc@robertcollins.net> | 2013-08-16 12:36:42 +1200 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2013-08-16 12:36:42 +1200 |
commit | 5211a9db5107b7f0c5540e8525647a4bab46cdf3 (patch) | |
tree | f5af1924808af5266579140b8889d415e937a526 /lib/fixtures/tests/_fixtures/test_popen.py | |
parent | 039ff7b76ca753b9241724f63e3acc67ff623afb (diff) | |
download | fixtures-5211a9db5107b7f0c5540e8525647a4bab46cdf3.tar.gz |
* ``FakePopen`` now accepts all the parameters available in Python 2.7.
(Robert Collins)
* ``FakePopen`` now only passes parameters to the get_info routine if the
caller supplied them. (Robert Collins)
Diffstat (limited to 'lib/fixtures/tests/_fixtures/test_popen.py')
-rw-r--r-- | lib/fixtures/tests/_fixtures/test_popen.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/fixtures/tests/_fixtures/test_popen.py b/lib/fixtures/tests/_fixtures/test_popen.py index 59bef71..4c11619 100644 --- a/lib/fixtures/tests/_fixtures/test_popen.py +++ b/lib/fixtures/tests/_fixtures/test_popen.py @@ -51,6 +51,19 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures): proc = fixture(['foo']) self.assertEqual('stdout', proc.stdout) + def test_handles_all_2_7_args(self): + all_args = dict( + args="args", bufsize="bufsize", executable="executable", + stdin="stdin", stdout="stdout", stderr="stderr", + preexec_fn="preexec_fn", close_fds="close_fds", shell="shell", + cwd="cwd", env="env", universal_newlines="universal_newlines", + startupinfo="startupinfo", creationflags="creationflags") + def get_info(proc_args): + self.assertEqual(all_args, proc_args) + return {} + fixture = self.useFixture(FakePopen(get_info)) + proc = fixture(**all_args) + class TestFakeProcess(testtools.TestCase): |