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

DM-38062: Allow test to pass if --log-level is used for pytest #790

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

timj
Copy link
Member

@timj timj commented Feb 17, 2023

There is still a confusing problem if pytest --log-cli-level is used.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 85.51% // Head: 85.51% // No change to project coverage 👍

Coverage data is based on head (be6ae92) compared to base (f8dc3d2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   85.51%   85.51%           
=======================================
  Files         266      266           
  Lines       35087    35087           
  Branches     7364     7364           
=======================================
  Hits        30004    30004           
  Misses       3768     3768           
  Partials     1315     1315           
Impacted Files Coverage Δ
python/lsst/daf/butler/tests/cliLogTestBase.py 85.61% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@timj
Copy link
Member Author

timj commented Feb 17, 2023

For the record, if I use --log-cli-level=DEBUG tests involving the Click runner mysteriously fail with:

>               stdout = outstreams[0].getvalue()
E               ValueError: I/O operation on closed file.

../../miniconda/envs/lsst-scipipe-5.0.0/lib/python3.10/site-packages/click/testing.py:434: ValueError

If I modify the click testing package to put a try/except around that line then all tests pass. I have no idea what is causing the problem (--log-cli-level=16 works but =15 fails).

Seems to be a known problem: pallets/click#824

@timj timj merged commit afc0f59 into main Feb 21, 2023
@timj timj deleted the tickets/DM-38062 branch February 21, 2023 15:34
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.

2 participants