Skip to content
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

fix no test id provided for pytest run #22569

Merged
merged 2 commits into from
Nov 29, 2023
Merged
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
8 changes: 8 additions & 0 deletions pythonFiles/vscode_pytest/run_pytest_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
try:
if test_ids_from_buffer:
arg_array = ["-p", "vscode_pytest"] + args + test_ids_from_buffer
print("Running pytest with args: " + str(arg_array))
pytest.main(arg_array)
else:
print(
"Error: No test ids received from stdin, could be an error or a run request without ids provided.",
)
print("Running pytest with no test ids as args. Args being used: ", args)
arg_array = ["-p", "vscode_pytest"] + args
pytest.main(arg_array)
except json.JSONDecodeError:
print("Error: Could not parse test ids from stdin")
Loading