diff tests/test_util.py @ 479:83fcb1cf6d8f

Avoid 'ValueError: close_fds is not supported on Windows platforms' exception
author Risto Kankkunen <risto.kankkunen@iki.fi>
date Wed, 29 Jul 2009 17:26:29 +0300
parents 256863a65141
children 37718f514acb
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -19,6 +19,13 @@ from mercurial import ui
 
 from hgsubversion import util
 
+import sys
+# Documentation for Subprocess.Popen() says:
+#   "Note that on Windows, you cannot set close_fds to true and
+#   also redirect the standard handles by setting stdin, stdout or
+#   stderr."
+canCloseFds='win32' not in sys.platform
+
 # Fixtures that need to be pulled at a subdirectory of the repo path
 subdir = {'truncatedhistory.svndump': '/project2',
           'fetch_missing_files_subdir.svndump': '/foo',