Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cd21098
Mark Windows-specific test failures as expected failures
samchakra0204 Apr 29, 2026
23a47a3
Remove Windows test skips from CI to enable expected failure testing
samchakra0204 Apr 29, 2026
cbf6fb7
Use expectedFailureIfWindows to avoid unexpected passes on non-Windows
samchakra0204 May 7, 2026
005fca1
Normalize Windows venv executable name in test_venv
samchakra0204 May 7, 2026
f3c3454
Use expectedFailureIfWindows for venv tests failing only on Windows
samchakra0204 May 7, 2026
d31cda8
Revert Windows-specific venv executable normalization in test_venv
samchakra0204 May 9, 2026
20a3067
Mark venv tests as expected failures on Windows and catch exceptions
samchakra0204 May 9, 2026
29e542b
Minimize venv patch to Windows expected failures only
samchakra0204 May 9, 2026
b1e1f44
Mark 4 failing venv tests as expected failure on Windows
samchakra0204 May 9, 2026
16897fa
Fix mangled UTF-8 in venv Windows expected failure markers
samchakra0204 May 18, 2026
56c17f0
Remove stale Windows expected failures in test_venv
samchakra0204 May 18, 2026
108e4c4
Merge remote-tracking branch 'upstream/main'
samchakra0204 May 18, 2026
b9096ac
Apply reviewer suggestions: add test_set to Windows env_polluting_tes…
samchakra0204 May 18, 2026
030bee3
Remove stale Windows expectedFailureIfWindows markers from pathlib an…
samchakra0204 May 18, 2026
ddcce88
Clear env_polluting_tests for CI workflows
samchakra0204 May 18, 2026
7f2a95e
Skip specific tests in Windows 2025 CI workflow
samchakra0204 May 18, 2026
562a6c7
Fix CI workflow and test_venv decorator issues
samchakra0204 May 18, 2026
479e21a
Fix snippets CI failures
samchakra0204 May 18, 2026
a66133f
Scope venv expected failures
samchakra0204 May 18, 2026
bd3cbcc
Update test_venv.py
samchakra0204 May 18, 2026
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
5 changes: 0 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,6 @@ jobs:
- os: windows-2025
extra_test_args: [] # TODO: Enable '-u all'
env_polluting_tests: []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
env_polluting_tests: []
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samchakra0204 you can leave test_venv here, and fix it in a separate PR if you want to:)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samchakra0204 If okay, can we have 4 different PRs for each removed skipped test (with the necessary test markers). this would allow us to iterate more rapidly, and get some of the code to be merged quicker (by not being blocked by another unrelated change)

timeout: 50
Comment thread
coderabbitai[bot] marked this conversation as resolved.
fail-fast: false
steps:
Expand Down
22 changes: 22 additions & 0 deletions Lib/test/test_pathlib/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2616,6 +2616,8 @@ def test_lstat_nosymlink(self):
st = p.stat()
self.assertEqual(st, p.lstat())

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_exists(self):
P = self.cls
p = P(self.base)
Expand All @@ -2635,6 +2637,8 @@ def test_exists(self):
self.assertIs(False, P(self.base + '\udfff').exists())
self.assertIs(False, P(self.base + '\x00').exists())

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_dir(self):
P = self.cls(self.base)
self.assertTrue((P / 'dirA').is_dir())
Expand All @@ -2648,6 +2652,8 @@ def test_is_dir(self):
self.assertFalse((P / 'dirA\udfff').is_dir())
self.assertFalse((P / 'dirA\x00').is_dir())

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_dir_no_follow_symlinks(self):
P = self.cls(self.base)
self.assertTrue((P / 'dirA').is_dir(follow_symlinks=False))
Expand All @@ -2661,6 +2667,8 @@ def test_is_dir_no_follow_symlinks(self):
self.assertFalse((P / 'dirA\udfff').is_dir(follow_symlinks=False))
self.assertFalse((P / 'dirA\x00').is_dir(follow_symlinks=False))

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_file(self):
P = self.cls(self.base)
self.assertTrue((P / 'fileA').is_file())
Expand All @@ -2674,6 +2682,8 @@ def test_is_file(self):
self.assertFalse((P / 'fileA\udfff').is_file())
self.assertFalse((P / 'fileA\x00').is_file())

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_file_no_follow_symlinks(self):
P = self.cls(self.base)
self.assertTrue((P / 'fileA').is_file(follow_symlinks=False))
Expand All @@ -2687,6 +2697,8 @@ def test_is_file_no_follow_symlinks(self):
self.assertFalse((P / 'fileA\udfff').is_file(follow_symlinks=False))
self.assertFalse((P / 'fileA\x00').is_file(follow_symlinks=False))

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_symlink(self):
P = self.cls(self.base)
self.assertFalse((P / 'fileA').is_symlink())
Expand All @@ -2703,6 +2715,8 @@ def test_is_symlink(self):
self.assertIs((P / 'linkA\udfff').is_file(), False)
self.assertIs((P / 'linkA\x00').is_file(), False)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_junction_false(self):
P = self.cls(self.base)
self.assertFalse((P / 'fileA').is_junction())
Expand All @@ -2719,6 +2733,8 @@ def test_is_junction_true(self):
self.assertEqual(P.is_junction(), P.parser.isjunction.return_value)
P.parser.isjunction.assert_called_once_with(P)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_fifo_false(self):
P = self.cls(self.base)
self.assertFalse((P / 'fileA').is_fifo())
Expand Down Expand Up @@ -2784,6 +2800,8 @@ def test_is_block_device_false(self):
self.assertIs((P / 'fileA\udfff').is_block_device(), False)
self.assertIs((P / 'fileA\x00').is_block_device(), False)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_char_device_false(self):
P = self.cls(self.base)
self.assertFalse((P / 'fileA').is_char_device())
Expand All @@ -2793,6 +2811,8 @@ def test_is_char_device_false(self):
self.assertIs((P / 'fileA\udfff').is_char_device(), False)
self.assertIs((P / 'fileA\x00').is_char_device(), False)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_char_device_true(self):
# os.devnull should generally be a char device.
P = self.cls(os.devnull)
Expand All @@ -2804,6 +2824,8 @@ def test_is_char_device_true(self):
self.assertIs(self.cls(f'{os.devnull}\udfff').is_char_device(), False)
self.assertIs(self.cls(f'{os.devnull}\x00').is_char_device(), False)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_is_mount(self):
P = self.cls(self.base)
self.assertFalse((P / 'fileA').is_mount())
Expand Down
6 changes: 6 additions & 0 deletions Lib/test/test_posixpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def test_islink(self):
self.assertIs(posixpath.exists(TESTFN + "2"), False)
self.assertIs(posixpath.lexists(TESTFN + "2"), True)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_islink_invalid_paths(self):
self.assertIs(posixpath.islink(TESTFN + "\udfff"), False)
self.assertIs(posixpath.islink(os.fsencode(TESTFN) + b"\xff"), False)
Expand All @@ -228,6 +230,8 @@ def test_ismount_non_existent(self):
finally:
os_helper.rmdir(ABSTFN)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_ismount_invalid_paths(self):
self.assertIs(posixpath.ismount('/\udfff'), False)
self.assertIs(posixpath.ismount(b'/\xff'), False)
Expand Down Expand Up @@ -492,6 +496,8 @@ def test_realpath_strict(self):
finally:
os_helper.unlink(ABSTFN)

# TODO: RUSTPYTHON
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_realpath_invalid_paths(self):
path = '/\x00'
self.assertRaises(ValueError, realpath, path, strict=False)
Expand Down
17 changes: 12 additions & 5 deletions Lib/test/test_venv.py
Comment thread
ShaharNaveh marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ def setUp(self):
self.lib = ('lib', f'python{sysconfig._get_python_version_abi()}')
self.include = 'include'
executable = sys._base_executable
self.exe = os.path.split(executable)[-1]
if sys.platform == 'win32':
exe_name = os.path.split(executable)[-1]
if os.path.splitext(exe_name)[0].endswith('_d'):
self.exe = 'python_d.exe'
else:
self.exe = 'python.exe'
else:
self.exe = os.path.split(executable)[-1]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this part @samchakra0204

if (sys.platform == 'win32'
and os.path.lexists(executable)
and not os.path.exists(executable)):
Expand Down Expand Up @@ -120,7 +127,7 @@ def isdir(self, *args):
self.assertTrue(os.path.isdir(fn))

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_defaults_with_str_path(self):
"""
Test the create function with default arguments and a str path.
Expand All @@ -130,7 +137,7 @@ def test_defaults_with_str_path(self):
self._check_output_of_default_create()

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_defaults_with_pathlike(self):
"""
Test the create function with default arguments and a path-like path.
Expand Down Expand Up @@ -415,7 +422,7 @@ def test_unoverwritable_fails(self):
self.clear_directory(self.env_dir)

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_upgrade(self):
"""
Test upgrading an existing environment directory.
Expand Down Expand Up @@ -678,7 +685,7 @@ def test_pathsep_error(self):
@unittest.skipIf(os.name == 'nt', 'not relevant on Windows')
@requireVenvCreate
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_zippath_from_non_installed_posix(self):
"""
Test that when create venv from non-installed python, the zip path
Expand Down