Skip to content

Conversation

@petrus-v
Copy link
Contributor

@petrus-v petrus-v commented Jun 18, 2025

fix #84

petrus-v added a commit to petrus-v/oca-custom that referenced this pull request Jun 18, 2025
Copy link
Contributor

@florentx florentx left a comment

Choose a reason for hiding this comment

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

I'm afraid that tests will no longer be run, with such change.
Method was calling super().run(...).

If you replace by a stub method, there will be no run.

'hasattr(BaseCase, "run")' returns True even if 'run' is only inherited
from a parent class, which causes 'del BaseCase.run' to raise an AttributeError.
We now catch the exception instead of checking with hasattr, to ensure
compatibility across Odoo versions where 'run' may or may not be defined
directly on BaseCase.
@codecov-commenter
Copy link

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

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #85   +/-   ##
=========================================
  Coverage          ?   35.48%           
=========================================
  Files             ?        1           
  Lines             ?      124           
  Branches          ?        0           
=========================================
  Hits              ?       44           
  Misses            ?       80           
  Partials          ?        0           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petrus-v petrus-v marked this pull request as ready for review June 20, 2025 12:23
@florentx florentx changed the title WIP instead of dropping attribute monkey patch the method to do nothing Fix AttributeError: run Jun 23, 2025
@florentx florentx changed the title Fix AttributeError: run Fix AttributeError: run with Odoo 14/15 Jun 23, 2025
@florentx florentx merged commit e13b04f into camptocamp:master Jun 23, 2025
6 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.

bug: AttributeError: run

4 participants