]> granicus.if.org Git - python/commitdiff
packaging: fix the constructor of FakePopen
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 19 May 2011 22:12:10 +0000 (00:12 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 19 May 2011 22:12:10 +0000 (00:12 +0200)
packaging.util requires the env keyword.

Lib/packaging/tests/test_util.py

index 203c708a43de9dd66199e7b62acaffc42c57d02e..8eb61ae518747f27ad5f57368eaa605607332629 100644 (file)
@@ -56,8 +56,14 @@ password:xxx
 class FakePopen:
     test_class = None
 
-    def __init__(self, cmd, shell, stdout, stderr):
-        self.cmd = cmd.split()[0]
+    def __init__(self, args, bufsize=0, executable=None,
+                 stdin=None, stdout=None, stderr=None,
+                 preexec_fn=None, close_fds=False,
+                 shell=False, cwd=None, env=None, universal_newlines=False,
+                 startupinfo=None, creationflags=0,
+                 restore_signals=True, start_new_session=False,
+                 pass_fds=()):
+        self.cmd = args.split()[0]
         exes = self.test_class._exes
         if self.cmd not in exes:
             # we don't want to call the system, returning an empty