-
Notifications
You must be signed in to change notification settings - Fork 31
PART 13: Use simpler mocking+more checks - After #319 #321
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
base: master
Are you sure you want to change the base?
Conversation
014f5bb to
e510492
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #321 +/- ##
==========================================
- Coverage 94.09% 94.01% -0.08%
==========================================
Files 51 51
Lines 4808 4747 -61
Branches 302 301 -1
==========================================
- Hits 4524 4463 -61
Misses 202 202
Partials 82 82 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Fixed the branch coverage regression in openqabot/main.py and added three commits |
c98c81a to
6c3bbe8
Compare
Wabri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong checkbox clicked on the previous review
db8fa3e to
6448585
Compare
caplog.messages is a method added in Python 3.7 simplifying our repeated use of `messages = [x[-1] for x in caplog.record_tuples]`
…of abused parametrize
…om decorator "with_fake_qem"
…ssages caplog.messages is a method added in Python 3.7 simplifying our code.
be06bdb to
d6079aa
Compare
|
@Wabri please re-review. I tried to address your points. @Martchus all your points addressed except for the open discussion #321 (comment) |
…l-mb/python-refactoring-skills This adds targets for additional code quality checks that seem to be not covered by ruff, i.e. maintainability check and duplication checks. complexity is already covered by C901. "radon" only outputs violations. The Python package "xenon" would call radon and fail if violations found but the package is not available in openSUSE so I was implementing a very simple check with inverted grep for "any output".
…fo to use patch fixture
…r and fix imports
…syncres.py Replaced pytest.MonkeyPatch with unittest.mock.patch for mocking in tests/test_incsyncres.py.
…st_openqabot_simple.py Replaced pytest.MonkeyPatch with unittest.mock.patch for mocking in tests/test_openqabot_simple.py.
…elper.py Replaced pytest.MonkeyPatch with unittest.mock.patch for mocking in tests/test_pc_helper.py.
…tsync.py Replaced pytest.MonkeyPatch with unittest.mock.patch for mocking in tests/test_smeltsync.py.
…tch context manager
…ch context manager
…atch context manager
…instead of patch context manager
This prevents a confusing log message like ``` Unable to load config file '/etc/openqabot/singlearch.yml': 'list' object has no attribute 'get' ```
d6079aa to
78fd366
Compare
After: