You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to skip test class decorated with the "at_install" odoo test tags while running my test using pytest.
Is there already some way to do so without adding extra line in code source ?
It works properly using Skip decorator @pytest.mark.skip(reason="Do not run at install test using pytest"), I was wondering if there are some plan to provide those tags as pytest marker to be able to filter those tests ?
The text was updated successfully, but these errors were encountered:
The at_install doesn't make much sense with pytest-odoo. You prepare first your database, then execute tests.
Usually what you want is to execute only a selection of tests, like your custom modules. As Odoo source code and OCA are already covered by their respective tests. It could be redundant to run them again locally. You might want a selection of Odoo core tests to validate you don't break anything but you might prefer to copy those tests and extend them as your workflow might have some customization to tests or that breaks odoo core tests.
My project is split in different module where I've few corner case where it make sense to use at_install flag as some parts are overwriting (I'm using odoo --test-enable to launch them)
Or while fixing/investigate issue to odoo/communautary modules
As a developer I want to execute test using pytest, I was wondering if at_install are discoverd as pytest marker to not launch those at_install tests easly ?
petrus-v
changed the title
Filtering test using odoo test tagged
Filtering test using odoo test tagged - how to avoid running at_install test ?
Mar 24, 2021
I'd like to skip test class decorated with the "at_install" odoo test tags while running my test using pytest.
Is there already some way to do so without adding extra line in code source ?
It works properly using Skip decorator
@pytest.mark.skip(reason="Do not run at install test using pytest")
, I was wondering if there are some plan to provide those tags as pytest marker to be able to filter those tests ?The text was updated successfully, but these errors were encountered: