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

Fix log message printing the number of loaded composites #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Nov 15, 2024

Trollflow2 is printing a log message saying Loading 1 composites even when there are more. This PR fixes the log message.

  • Tests added
  • Tests passed
  • Passes flake8 trollflow2

@pnuu pnuu added the bug Something isn't working label Nov 15, 2024
@pnuu pnuu requested a review from gerritholl November 15, 2024 07:41
@pnuu pnuu self-assigned this Nov 15, 2024
@pnuu pnuu requested a review from mraspaud as a code owner November 15, 2024 07:41
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.97%. Comparing base (98355d9) to head (f144025).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   95.96%   95.97%   +0.01%     
==========================================
  Files          14       14              
  Lines        3268     3280      +12     
==========================================
+ Hits         3136     3148      +12     
  Misses        132      132              
Flag Coverage Δ
unittests 95.97% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@gerritholl gerritholl left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one small question on caplog in the test.

Comment on lines +847 to +850
@pytest.fixture(autouse=True)
def inject_fixtures(self, caplog):
"""Inject fixtures."""
self._caplog = caplog
Copy link
Member

Choose a reason for hiding this comment

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

What is the benefit of storing a _caplog attribute and using that, rather than using the caplog attribute in the tests directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only way to use fixtures in unittest.TestCase classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

3 participants