Skip to content
Open
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
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: []
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
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
22 changes: 18 additions & 4 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 @@ -120,7 +120,9 @@ def isdir(self, *args):
self.assertTrue(os.path.isdir(fn))

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
# TODO: RUSTPYTHON – venv executable creation not fully functional
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON – venv executable creation not fully functional")
def test_defaults_with_str_path(self):
"""
Test the create function with default arguments and a str path.
Expand All @@ -130,7 +132,9 @@ def test_defaults_with_str_path(self):
self._check_output_of_default_create()

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
# TODO: RUSTPYTHON – venv executable creation not fully functional
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON – venv executable creation not fully functional")
def test_defaults_with_pathlike(self):
"""
Test the create function with default arguments and a path-like path.
Expand Down Expand Up @@ -284,6 +288,7 @@ def test_prefixes(self):
pathlib.Path(expected), prefix)

@requireVenvCreate
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_sysconfig(self):
"""
Test that the sysconfig functions work in a virtual environment.
Expand Down Expand Up @@ -318,6 +323,7 @@ def test_sysconfig(self):

@requireVenvCreate
@unittest.skipUnless(can_symlink(), 'Needs symlinks')
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_sysconfig_symlinks(self):
"""
Test that the sysconfig functions work in a virtual environment.
Expand Down Expand Up @@ -415,7 +421,9 @@ def test_unoverwritable_fails(self):
self.clear_directory(self.env_dir)

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
# TODO: RUSTPYTHON – venv upgrade not yet implemented
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON – venv upgrade not yet implemented")
def test_upgrade(self):
"""
Test upgrading an existing environment directory.
Expand Down Expand Up @@ -472,6 +480,7 @@ def test_symlinking(self):
# 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.
@requireVenvCreate
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_executable(self):
"""
Test that the sys.executable value is as expected.
Expand All @@ -484,6 +493,7 @@ def test_executable(self):
self.assertEqual(out.strip(), envpy.encode())

@unittest.skipUnless(can_symlink(), 'Needs symlinks')
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_executable_symlinks(self):
"""
Test that the sys.executable value is as expected.
Expand Down Expand Up @@ -552,6 +562,7 @@ def test_special_chars_csh(self):

# gh-124651: test quoted strings on Windows
@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_special_chars_windows(self):
"""
Test that the template strings are quoted properly on Windows
Expand Down Expand Up @@ -678,7 +689,9 @@ def test_pathsep_error(self):
@unittest.skipIf(os.name == 'nt', 'not relevant on Windows')
@requireVenvCreate
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
# TODO: RUSTPYTHON – zip path detection broken in RustPython
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON – zip path detection broken in RustPython")
def test_zippath_from_non_installed_posix(self):
"""
Test that when create venv from non-installed python, the zip path
Expand Down Expand Up @@ -882,6 +895,7 @@ def test_venv_same_path(self):
# gh-126084: venvwlauncher should run pythonw, not python
@requireVenvCreate
@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_venvwlauncher(self):
"""
Test that the GUI launcher runs the GUI python.
Expand Down
Loading