Mark Windows-specific test failures as expected failures#7737
Mark Windows-specific test failures as expected failures#7737samchakra0204 wants to merge 9 commits into
Conversation
- Added @unittest.expectedFailure + TODO: RUSTPYTHON to: - test_pathlib: surrogate/Windows-path tests - test_posixpath: invalid path tests (islink, ismount, realpath) - Other previously skipped tests (rlcompleter, venv) were already marked - No CI skip list existed in this fork, so no YAML change needed Closes RustPython#3960
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe CI workflow's ChangesWindows Test Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/pathlib dependencies:
dependent tests: (91 tests)
[x] lib: cpython/Lib/posixpath.py dependencies:
dependent tests: (66 tests)
[ ] lib: cpython/Lib/venv dependencies:
dependent tests: (no tests depend on venv) Legend:
|
ShaharNaveh
left a comment
There was a problem hiding this comment.
Tysm for the patch!
Can you pleas remove the relevant tests from:
RustPython/.github/workflows/ci.yaml
Lines 245 to 249 in 6b67067
So the CI will test them?
- Removed skips for test_rlcompleter, test_pathlib, test_posixpath, test_venv - CI will now run these tests and show expected failures - Addresses reviewer feedback
|
@ShaharNaveh Thanks for the catch! I’ve removed the |
|
You may need to use RustPython's custom |
About that... |
| self.assertEqual(st, p.lstat()) | ||
|
|
||
| # TODO: RUSTPYTHON | ||
| @unittest.expectedFailure |
There was a problem hiding this comment.
| @unittest.expectedFailure | |
| @unittest.expectedFailureIfWindows("TODO: RUSTPYTHON") |
The same for the rest of the patches, and then it should be good
There was a problem hiding this comment.
I had to update your comment because that decorator expects another argument.
RustPython/Lib/unittest/__init__.py
Lines 99 to 112 in 6b67067
| - 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 |
There was a problem hiding this comment.
@samchakra0204 you can leave test_venv here, and fix it in a separate PR if you want to:)
| else: | ||
| self.exe = 'python.exe' | ||
| else: | ||
| self.exe = os.path.split(executable)[-1] |
|
@ShaharNaveh Hi, I’ve applied the requested revert in |
- Add @unittest.expectedFailureIfWindows decorators to venv tests that execute the venv python.exe - Wrap subprocess calls in try/except to convert FileNotFoundError to AssertionError for expectedFailure to work
| out, err = check_output(cmd, encoding='utf-8') | ||
| self.assertEqual(out.strip(), expected, err) | ||
| except Exception as e: | ||
| self.fail(f"venv executable failed: {e}") |
There was a problem hiding this comment.
We want to minimize our manual changes for upstream code.
If you want to can take the file from #7798 and apply your changes to it.
| - 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 |
There was a problem hiding this comment.
@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)
- test_defaults_with_str_path, test_defaults_with_pathlike, test_upgrade, test_zippath_from_non_installed_posix - Use @unittest.expectedFailureIfWindows with TODO: RUSTPYTHON comment
Summary by CodeRabbit