FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update terminal.py to fix #11777 by HolyMagician03-UMich · Pull Request #12192 · pytest-dev/pytest · GitHub

Update terminal.py to fix #11777 - #12192

Merged
nicoddemus merged 12 commits into
pytest-dev:mainfrom
HolyMagician03-UMich:main
Apr 10, 2024
Merged

Update terminal.py to fix #11777#12192
nicoddemus merged 12 commits into
pytest-dev:mainfrom
HolyMagician03-UMich:main

Conversation

HolyMagician03-UMich commented Apr 6, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Increases width for short test summary info to reflect verbosity settings. Temporarily resolves #11777

Copy link
Copy Markdown
Contributor Author

Hi! Can I get some opinion on what the available_width should be set to? Right now it's hard-coded to 500, so I imagine that if the list gets longer, the same issue will occur again.

Also, this is the first time I'm contributing to an open-source project, so please let me know what I'm missing in this commit. Thanks!

Copy link
Copy Markdown
Member

Hi! Can I get some opinion on what the available_width should be set to? Right now it's hard-coded to 500, so I imagine that if the list gets longer, the same issue will occur again.

I think in this case we do not want to call _format_trimmed at all, leaving the string unchanged.

nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @HolyMagician03-UMich!

Besides my comments, please add a new test to test_terminal.py to test the new behavior.

You will need to monkeypatch running_on_ci to always return False in order to ensure the test is testing the -vv flag when running on GitHub actions.

Comment thread changelog/11777.bugfix.rst Outdated
Comment thread changelog/11777.bugfix.rst Outdated
Comment thread src/_pytest/terminal.py Outdated

HolyMagician03-UMich commented Apr 7, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hi! It seems that right now test_line_with_reprcrash is failing because the config object is not initialized with a option.verbose field. Would it be ok for me to modify the config class and give it a verbose of 0? It'll be similar to line 2460 - 2466 of the test_terminal.py in the previous commit, just with a verbosity value of 0.

Copy link
Copy Markdown
Member

Would it be ok for me to modify the config class and give it a verbose of 0?

You mean the stub config object used in the test? Yes please go ahead.

Comment thread testing/test_terminal.py
check("🉐🉐🉐🉐🉐\n2nd line", 80, "FAILED nodeid::🉐::withunicode - 🉐🉐🉐🉐🉐")


def test_short_summary_with_verbose(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@HolyMagician03-UMich took the liberty of simplifying this test. 👍

nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Contributor Author

@nicoddemus Thank you for taking the time to review these changes!

Copy link
Copy Markdown
Member

Note to self: squash before merging.

I will leave this open for a few more days in case others want to review it.

nicoddemus merged commit 089116b into pytest-dev:main Apr 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verbosity setting does not affect truncation of sequences when comparing their length

2 participants


Back | FazBrowse Home | New Git URL