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 mocking the xen-bugtool script in with Python 3.12 #90

Conversation

bernhardkaindl
Copy link
Collaborator

Fix for importing and mocking the xen-bugtool script as a module in Python 3.12:

Python3.12's mocker.patch() stopped supporting modules with a "-" in them.

Use "bugtool" as the module name instead of "xen-bugtool" to avoid this problem with the mocker.patch() function in Python 3.12.

The other commit in this PR for the dictionary file is needed to fix the spellcheck in CI.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Merging #90 (7193884) into master (d0e569d) will increase coverage by 9%.
Report is 10 commits behind head on master.
The diff coverage is 100%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #90     +/-   ##
======================================
+ Coverage      88%   98%     +9%     
======================================
  Files          18    18             
  Lines        2196   626   -1570     
======================================
- Hits         1939   615   -1324     
+ Misses        257    11    -246     
Files Coverage Δ
tests/unit/conftest.py 100% <100%> (ø)
tests/unit/test_dump_xapi_rrds.py 100% <100%> (ø)
tests/unit/test_output.py 100% <100%> (ø)

... and 1 file with indirect coverage changes

Flag Coverage Δ
python2.7 95% <100%> (+8%) ⬆️
python3.10.13 100% <100%> (+12%) ⬆️

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

@coveralls
Copy link

coveralls commented Mar 12, 2024

Pull Request Test Coverage Report for Build 8373887749

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.2%) to 94.697%

Totals Coverage Status
Change from base Build 8373764528: 2.2%
Covered Lines: 625
Relevant Lines: 660

💛 - Coveralls

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
@bernhardkaindl bernhardkaindl force-pushed the fix-for-pytest-on-3.12--Fix-module-name branch from dd0587d to 7193884 Compare March 21, 2024 11:04
@bernhardkaindl bernhardkaindl merged commit 99d9441 into xenserver:master Mar 22, 2024
13 checks passed
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.

4 participants