Skip to content

Instantly share code, notes, and snippets.

@simahawk
Last active June 16, 2017 13:15
Show Gist options
  • Save simahawk/5d43eb72ca1d56634ceac41916bb272d to your computer and use it in GitHub Desktop.
Save simahawk/5d43eb72ca1d56634ceac41916bb272d to your computer and use it in GitHub Desktop.
Odoo nosetests how to configure and run
[openerp]
eggs += nose
openerp_scripts = nosetests command-line-options=-d openerp-log-level=WARN
# "-s" captures stdout allowing use of pdb
# to run all tests per module
bin/nosetests_openerp -d dbname -- path/to/module -s
# to run all tests per file
bin/nosetests_openerp -d dbname -- path/to/module/tests/foo.py -s
# to run only a suite
bin/nosetests_openerp -d dbname -- path/to/module/tests/foo.py:TestCase -s
# to run only a single test
bin/nosetests_openerp -d dbname -- path/to/module/tests/foo.py:TestCase.test_foo -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment