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 Status #26

Open
blaggacao opened this issue Oct 23, 2018 · 1 comment
Open

Support Status #26

blaggacao opened this issue Oct 23, 2018 · 1 comment

Comments

@blaggacao
Copy link

blaggacao commented Oct 23, 2018

Hi, I'm investigating this wonderful piece of code.

Analyzing this: odoo-dev/odoo@95a131b

My questions are:

  • How far standard odoo module test are supported?
  • Looking at the marked modules, is there a support gap?
  • Isn't ModuleTest necesary in combination with pre and post tests?
  • Where DataTests used for (now deprecated) yaml files (and are therfore not needed here)?
blaggacao referenced this issue in odoo-dev/odoo Oct 24, 2018
* runs python tests installing ~everything (grep -v
  'website_version\|l10n\|hw_\|theme')
* removes unused code

Side-changes necessary for the pytest runner to work:
* remove incorrect import
* add @skipif annotations for tests which used to be implicitly
  skipped (not imported and not found by the runner) but are
  found by the pytest collector
* added __init__ files to test directories: test directories *must*
  valid but unimported python packages otherwise pytest kinda
  goes screwy
@guewen
Copy link
Contributor

guewen commented Oct 24, 2018

Odoo's --test-enable machinery and pytest-odoo do not cover exactly the same scope. The odoo's test runner runs the tests during the upgrades of the addons, that's why they need the "at install" and "post install" markers.

Running tests during upgrades of addons is waaay too slow to work efficiently in a TDD mode, that's where pytest-odoo shines. Consider that all the tests are running post-install with pytest-odoo, as you must run the upgrade of the addon before (but only when needed vs each run).

At the end of the day, you'll have to run the odoo tests with --test-enable because, in very rare conditions, a test can pass with pytest-odoo but not with the "at install" tests run during the upgrade (or the reverse). I consider pytest-odoo to be a development tool, but not the tool that should replace entirely --test-enable in a CI.

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

No branches or pull requests

2 participants