Skip to content

gh-117923: Catch test_webbrowser.test_parse_args_error stderr output#117924

Merged
sobolevn merged 2 commits intopython:mainfrom
Eclips4:issue-117923
Apr 17, 2024
Merged

gh-117923: Catch test_webbrowser.test_parse_args_error stderr output#117924
sobolevn merged 2 commits intopython:mainfrom
Eclips4:issue-117923

Conversation

@Eclips4
Copy link
Copy Markdown
Member

@Eclips4 Eclips4 commented Apr 16, 2024

Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks, cleaning up tests output is a good thing. But, tests are failing now :(

Comment thread Lib/test/test_webbrowser.py Outdated
Comment thread Lib/test/test_webbrowser.py
@Eclips4 Eclips4 requested a review from sobolevn April 17, 2024 04:55
Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thank you!

@sobolevn
Copy link
Copy Markdown
Member

Before:

» ./python.exe -m test test_webbrowser -m test_parse_args_error -v

== CPython 3.13.0a6+ (heads/issue-116023-dirty:c96888591e8, Apr 16 2024, 11:11:16) [Clang 15.0.0 (clang-1500.3.9.4)]
== macOS-14.4.1-arm64-arm-64bit-Mach-O little-endian
== Python build: debug
== cwd: /Users/sobolev/Desktop/cpython2/build/test_python_worker_61399æ
== CPU count: 12
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 1670789570
0:00:00 load avg: 1.75 Run 1 test sequentially
0:00:00 load avg: 1.75 [1/1] test_webbrowser
test_parse_args_error (test.test_webbrowser.CliTest.test_parse_args_error) ... usage: __main__.py [-h] [-n | -t] url
__main__.py: error: argument -t/--new-tab: not allowed with argument -n/--new-window
usage: __main__.py [-h] [-n | -t] url
__main__.py: error: argument -t/--new-tab: not allowed with argument -n/--new-window
usage: __main__.py [-h] [-n | -t] url
__main__.py: error: argument -t/--new-tab: not allowed with argument -n/--new-window
usage: __main__.py [-h] [-n | -t] url
__main__.py: error: argument -t/--new-tab: not allowed with argument -n/--new-window
usage: __main__.py [-h] [-n | -t] url
__main__.py: error: ambiguous option: --new could match --new-window, --new-tab
ok

----------------------------------------------------------------------
Ran 1 test in 0.003s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 72 ms
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered)
Result: SUCCESS

After:

» ./python.exe -m test test_webbrowser -m test_parse_args_error -v

== CPython 3.13.0a6+ (heads/issue-116023-dirty:c96888591e8, Apr 16 2024, 11:11:16) [Clang 15.0.0 (clang-1500.3.9.4)]
== macOS-14.4.1-arm64-arm-64bit-Mach-O little-endian
== Python build: debug
== cwd: /Users/sobolev/Desktop/cpython2/build/test_python_worker_61555æ
== CPU count: 12
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests

Using random seed: 2078768694
0:00:00 load avg: 1.98 Run 1 test sequentially
0:00:00 load avg: 1.98 [1/1] test_webbrowser
test_parse_args_error (test.test_webbrowser.CliTest.test_parse_args_error) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.003s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 85 ms
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered)
Result: SUCCESS

@sobolevn sobolevn merged commit 8123c34 into python:main Apr 17, 2024
@sobolevn
Copy link
Copy Markdown
Member

Does it need a backport?

@Eclips4
Copy link
Copy Markdown
Member Author

Eclips4 commented Apr 17, 2024

Does it need a backport?

No, this test was not backported to 3.12/3.11 branches.
Thank you Nikita for your review!

@Eclips4 Eclips4 deleted the issue-117923 branch April 17, 2024 07:28
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants