Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@ jobs:
extra_test_args: [] # TODO: Enable '-u all'
env_polluting_tests:
- test_set
skips:
- test_rlcompleter
- test_pathlib # panic by surrogate chars
- test_posixpath # OSError: (22, 'The filename, directory name, or volume label syntax is incorrect. (os error 123)')
- test_venv # couple of failing tests
skips: []
timeout: 50
fail-fast: false
steps:
Expand Down
13 changes: 13 additions & 0 deletions Lib/test/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def pip_cmd_checker(cmd, **kwargs):
with patch('venv.subprocess.check_output', pip_cmd_checker):
builder.upgrade_dependencies(fake_context)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
def test_prefixes(self):
"""
Expand All @@ -285,6 +286,7 @@ def test_prefixes(self):
self.assertEqual(pathlib.Path(out.strip().decode()),
pathlib.Path(expected), prefix)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
def test_sysconfig(self):
"""
Expand Down Expand Up @@ -318,6 +320,7 @@ def test_sysconfig(self):
out, err = check_output(cmd, encoding='utf-8')
self.assertEqual(out.strip(), expected, err)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
@unittest.skipUnless(can_symlink(), 'Needs symlinks')
def test_sysconfig_symlinks(self):
Expand Down Expand Up @@ -458,6 +461,7 @@ def test_isolation(self):
data = self.get_text_file_contents('pyvenv.cfg')
self.assertIn('include-system-site-packages = %s\n' % s, data)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(can_symlink(), 'Needs symlinks')
def test_symlinking(self):
"""
Expand All @@ -482,6 +486,7 @@ def test_symlinking(self):
# run the test, the pyvenv.cfg in the venv created in the test will
# point to the venv being used to run the test, and we lose the link
# to the source build - so Python can't initialise properly.
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
def test_executable(self):
"""
Expand All @@ -494,6 +499,7 @@ def test_executable(self):
'import sys; print(sys.executable)'])
self.assertEqual(out.strip(), envpy.encode())

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(can_symlink(), 'Needs symlinks')
def test_executable_symlinks(self):
"""
Expand Down Expand Up @@ -562,6 +568,7 @@ def test_special_chars_csh(self):
self.assertEndsWith(lines[1], env_name.encode())

# gh-124651: test quoted strings on Windows
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
def test_special_chars_windows(self):
"""
Expand All @@ -585,6 +592,7 @@ def test_special_chars_windows(self):
self.assertTrue(env_name.encode() in lines[0])
self.assertEndsWith(lines[1], env_name.encode())

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
def test_unicode_in_batch_file(self):
"""
Expand Down Expand Up @@ -616,6 +624,7 @@ def test_failed_symlink(self):
filepath_regex = r"'[A-Z]:\\\\(?:[^\\\\]+\\\\)*[^\\\\]+'"
self.assertRegex(err, rf"Unable to symlink {filepath_regex} to {filepath_regex}")

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
def test_multiprocessing(self):
"""
Expand All @@ -635,6 +644,7 @@ def test_multiprocessing(self):
'pool.terminate()'])
self.assertEqual(out.strip(), "python".encode())

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
def test_multiprocessing_recursion(self):
"""
Expand Down Expand Up @@ -892,6 +902,7 @@ def test_venv_same_path(self):
self.assertFalse(same_path(path1, path2))

# gh-126084: venvwlauncher should run pythonw, not python
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@requireVenvCreate
@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
def test_venvwlauncher(self):
Expand Down Expand Up @@ -926,11 +937,13 @@ def assert_pip_not_installed(self):
self.assertEqual(out.strip(), "OK")


@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_no_pip_by_default(self):
rmtree(self.env_dir)
self.run_with_capture(venv.create, self.env_dir)
self.assert_pip_not_installed()

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_explicit_no_pip(self):
rmtree(self.env_dir)
self.run_with_capture(venv.create, self.env_dir, with_pip=False)
Expand Down
Loading