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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not render pytest at info, and give it a description. #10164

Merged
merged 1 commit into from Jun 25, 2020

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Jun 25, 2020

Problem

Marking this @rule INFO caused it to start rendering both startup and shutdown even in the healthy case. In CI that looks like:

...
05:37:09 [INFO] Starting: run_python_test
05:37:09 [INFO] Starting: run_python_test
05:37:09 [INFO] Starting: run_python_test
...

Solution

Remove level=INFO to default to DEBUG, but add a description so that when a test fails, you get human readable output.

Result

$ ./v2 test tests/python/pants_test/util/test_strutil.py
10:59:46.38 [INFO] Completed: Run Pytest for tests/python/pants_test/util:strutil
10:59:46.38 [ERROR] Completed: Run Pytest - tests failed: tests/python/pants_test/util:strutil
饜剛 tests/python/pants_test/util:strutil
...

and without the UI:

$ ./v2 --no-dynamic-ui test tests/python/pants_test/util/test_strutil.py
18:01:24 [INFO] Starting: Run Pytest for tests/python/pants_test/util:strutil
18:01:26 [INFO] Completed: Run Pytest for tests/python/pants_test/util:strutil
18:01:26 [ERROR] Completed: Run Pytest - tests failed: tests/python/pants_test/util:strutil
饜剛 tests/python/pants_test/util:strutil
...

[ci skip-rust-tests]
[ci skip-jvm-tests]

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks!

tests/python/pants_test/util/test_strutil.py Outdated Show resolved Hide resolved
@stuhood stuhood force-pushed the stuhood/remove-run-pytest-info branch from 462565f to 8796c37 Compare June 25, 2020 18:11
@stuhood stuhood merged commit 1e24b8b into pantsbuild:master Jun 25, 2020
@stuhood stuhood deleted the stuhood/remove-run-pytest-info branch June 25, 2020 20:03
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.

None yet

3 participants