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

gh-129363: Change regrtest sequential mode output #129476

Closed
wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 30, 2025

First, write the test name without color. Then, write the test name and the result with color. Each test is displayed twice.

Example:

Capture d’écran du 2025-01-30 17-05-19

First, write the test name without color. Then, write the test name
and the result with color. Each test is displayed twice.
@vstinner
Copy link
Member Author

cc @hugovk @Yhg1s

@hugovk
Copy link
Member

hugovk commented Jan 31, 2025

This is an improvement but will double the length of the logs.

Shall we take inspiration from pytest, which first prints the (uncoloured) name of the test, and then appends the coloured result?

image

So we could do it something like this?

image

@vstinner
Copy link
Member Author

vstinner commented Feb 5, 2025

Shall we take inspiration from pytest, which first prints the (uncoloured) name of the test, and then appends the coloured result?

Currently, when a test fails, it's output is written directly. So we cannot just add "passed" or "failed" after running a test.

Example (I added a bug to test_os):

0:00:00 load avg: 0.41 [1/1] test_os
test test_os failed -- Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_os.py", line 188, in test_access
    x
NameError: name 'x' is not defined

0:00:00 load avg: 0.41 [1/1/1] test_os failed (1 error)

@vstinner
Copy link
Member Author

vstinner commented Feb 6, 2025

I wrote #129687 instead, I abandon this PR.

@vstinner vstinner closed this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants