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

Support pytest > 8.0 #74

Merged
merged 1 commit into from
Oct 6, 2024
Merged

Conversation

petrus-v
Copy link
Contributor

@petrus-v petrus-v commented Oct 3, 2024

Here monkey patching pytest itself to load test odoo test modules forcing odoo namespacing

this PR is based on #73

@petrus-v petrus-v changed the title Yet an other v8 support try... Support pytest > 8.0 Oct 3, 2024
@petrus-v petrus-v marked this pull request as ready for review October 3, 2024 15:26
@petrus-v petrus-v marked this pull request as draft October 3, 2024 15:28
@petrus-v
Copy link
Contributor Author

petrus-v commented Oct 3, 2024

@simahawk with this version we are not compatible with pytest < 8 (which it doesn't matter) and I haven't limitations that #70 had !

I'll keep in draft I'll like to add some unit test but I've test it on different project without problems ! I'll would be happy to get some other feedbacks.

@petrus-v petrus-v force-pushed the imp-v8-support branch 3 times, most recently from e710e64 to 2be3415 Compare October 4, 2024 16:11
@petrus-v petrus-v marked this pull request as ready for review October 4, 2024 16:14
@petrus-v
Copy link
Contributor Author

petrus-v commented Oct 4, 2024

unittest has been added !

@yvaucher
Copy link
Member

yvaucher commented Oct 5, 2024

Please rebase (seems the commits here are slightly different than in #73)

@yvaucher
Copy link
Member

yvaucher commented Oct 5, 2024

By the way your commit message has some typo on monkey patching

…module

...name ensuring proper odoo.addons namespace
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@c87b3f0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pytest_odoo.py 76.92% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #74   +/-   ##
=========================================
  Coverage          ?   31.39%           
=========================================
  Files             ?        1           
  Lines             ?       86           
  Branches          ?        0           
=========================================
  Hits              ?       27           
  Misses            ?       59           
  Partials          ?        0           

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

@petrus-v
Copy link
Contributor Author

petrus-v commented Oct 6, 2024

@yvaucher thanks for review and adding odoo mock package !

I've rebase and rewords the commit.

Copy link
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Tested locally, seems to works fine

@yvaucher yvaucher merged commit 4a6e996 into camptocamp:master Oct 6, 2024
3 checks passed
@lmignon
Copy link
Contributor

lmignon commented Oct 7, 2024

@yvaucher @petrus-v I tested it on a large install and I've unexpected behavior. I'm going to dive into this code to understand whether the problem is in this change or in my project.

@lmignon
Copy link
Contributor

lmignon commented Oct 7, 2024

@yvaucher @petrus-v I tested it on a large install and I've unexpected behavior. I'm going to dive into this code to understand whether the problem is in this change or in my project.

My bad, the pytest lib was still in version < 7.0. Everything is working fine. Thank you @petrus-v

@petrus-v
Copy link
Contributor Author

petrus-v commented Oct 7, 2024

@yvaucher @petrus-v I tested it on a large install and I've unexpected behavior. I'm going to dive into this code to understand whether the problem is in this change or in my project.

My bad, the pytest lib was still in version < 7.0. Everything is working fine. Thank you @petrus-v

Great ! thanks for testing and feedback.

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