summaryrefslogtreecommitdiff
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2014-02-07 23:46:38 +1000
committerNick Coghlan <ncoghlan@gmail.com>2014-02-07 23:46:38 +1000
commit11c5afd1383656e78d35a8405729c207d2287bdd (patch)
tree5833d5a4a01807928315b388a6be28cc91a1b30d /Lib/test/test_venv.py
parent96252cd7249814b4bfeb915c39ae5e346a7fdc58 (diff)
downloadcpython-git-11c5afd1383656e78d35a8405729c207d2287bdd.tar.gz
Issue #20053: Mark as an expected failure for 3.4
Diffstat (limited to 'Lib/test/test_venv.py')
-rw-r--r--Lib/test/test_venv.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index bbbf73731a..1084a99a5e 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -28,6 +28,12 @@ except ImportError:
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
'Test not appropriate in a venv')
+# os.path.exists('nul') is False: http://bugs.python.org/issue20541
+if os.devnull.lower() == 'nul':
+ failsOnWindows = unittest.expectedFailure
+else:
+ def failsOnWindows(f):
+ return f
class BaseTest(unittest.TestCase):
"""Base class for venv tests."""
@@ -288,9 +294,12 @@ class EnsurePipTest(BaseTest):
self.run_with_capture(venv.create, self.env_dir, with_pip=False)
self.assert_pip_not_installed()
+ @failsOnWindows
def test_devnull_exists_and_is_empty(self):
# Fix for issue #20053 uses os.devnull to force a config file to
- # appear empty. Make sure that assumption is valid cross platform.
+ # appear empty. However http://bugs.python.org/issue20541 means
+ # that doesn't currently work properly on Windows. Once that is
+ # fixed, the "win_location" part of test_with_pip should be restored
self.assertTrue(os.path.exists(os.devnull))
with open(os.devnull, "rb") as f:
self.assertEqual(f.read(), b"")
@@ -319,7 +328,8 @@ class EnsurePipTest(BaseTest):
# cross-platform variation in test code behaviour
win_location = ("pip", "pip.ini")
posix_location = (".pip", "pip.conf")
- for dirname, fname in (win_location, posix_location):
+ # Skips win_location due to http://bugs.python.org/issue20541
+ for dirname, fname in (posix_location,):
dirpath = os.path.join(home_dir, dirname)
os.mkdir(dirpath)
fpath = os.path.join(dirpath, fname)