Skip to content

[MIG] odoo_test_xmlrunner: Migration to 19.0 - #3598

Open
yajo wants to merge 15 commits into
OCA:19.0from
moduon:19.0-mig-odoo_test_xmlrunner
Open

[MIG] odoo_test_xmlrunner: Migration to 19.0#3598
yajo wants to merge 15 commits into
OCA:19.0from
moduon:19.0-mig-odoo_test_xmlrunner

Conversation

@yajo

@yajo yajo commented Apr 15, 2026

Copy link
Copy Markdown
Member

Nothing special

@moduon MT-14138

@OCA-git-bot OCA-git-bot added series:19.0 mod:odoo_test_xmlrunner Module odoo_test_xmlrunner labels Apr 15, 2026
@yajo

yajo commented Apr 16, 2026

Copy link
Copy Markdown
Member Author

/ocabot migration odoo_test_xmlrunner

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Apr 16, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 16, 2026
43 tasks
madecsmile and others added 14 commits July 30, 2026 08:44
Also implement a better patch and merge test results.
- It doesn't make sense to make this module auto installable.
- As the module depends only on 'base' AND introduces a new external dependency to an extra library (unittest-xml-reporting) all the instances that are cloning server-tools repo will have trouble, because it will not be possible to install this module, due to missing dependency
@yajo
yajo force-pushed the 19.0-mig-odoo_test_xmlrunner branch from 103260f to 36e5ce6 Compare July 30, 2026 07:45
@yajo

yajo commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Rebased. Conflicts fixed. It includes now what I pushed to #3689 by mistake.

…file

When setUpClass or tearDownClass fails, unittest creates an _ErrorHolder

without running _XMLTestResult.startTest, so xmlrunner kept the source file of the previous test in self.filename. This made the JUnit report assign the failure to an unrelated module and left classname empty.

Resolve the real test class from the _ErrorHolder description (setUpClass/tearDownClass (module.ClassName)), look up its source file and line with inspect, and patch the stored test info in addError/addFailure before the report is generated. Include a regression test that reproduces the wrong-file issue and verifies the fix.

Assisted-by: OpenCode + kimi-k2.7-code
@yajo
yajo force-pushed the 19.0-mig-odoo_test_xmlrunner branch from 36e5ce6 to 1dc6df8 Compare July 30, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:odoo_test_xmlrunner Module odoo_test_xmlrunner series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants