Skip to content

Always skip pyrepl tests that contain "can't use pyrepl" #133054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Apr 27, 2025 · 0 comments
Closed

Always skip pyrepl tests that contain "can't use pyrepl" #133054

sobolevn opened this issue Apr 27, 2025 · 0 comments
Assignees
Labels
tests Tests in the Lib/test dir topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Apr 27, 2025

Bug report

Right now there's a pattern in https://github.com/python/cpython/blob/main/Lib/test/test_pyrepl/test_pyrepl.py

that looks like this:

output, exit_code = self.run_repl(commands, env=env)
if "can't use pyrepl" in output:
    self.skipTest("pyrepl not available")

We manually check the error message after run_repl call and then skip the test.
This design is prone to possible errors.

I propose to do this check in run_pyrepl itself.

Linked PRs

@sobolevn sobolevn added tests Tests in the Lib/test dir topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error labels Apr 27, 2025
@sobolevn sobolevn self-assigned this Apr 27, 2025
sobolevn added a commit to sobolevn/cpython that referenced this issue Apr 27, 2025
sobolevn added a commit that referenced this issue Apr 28, 2025
…ted (#133055)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
sobolevn added a commit to sobolevn/cpython that referenced this issue Apr 28, 2025
…epl` is reported (pythonGH-133055)

(cherry picked from commit b739ec5)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
sobolevn added a commit that referenced this issue Apr 28, 2025
…s reported (GH-133055) (#133095)

(cherry picked from commit b739ec5)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant