Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: assert_equals in yaml python blocks

by
Pedro M. Baeza
- 09/23/2014 07:50:13
Can we add "import xxx" in tests, because the dependency is only for test (so to be put on Travis or test machine)?

Regards.

2014-09-23 13:41 GMT+02:00 Leonardo "LeartS" Donelli <learts92@gmail.com>:
That dependency is necessary only for running the tests though, and I
don't think putting nose in __openerp__.py as a python dependency,
when it isn't really required for the module to work, is a good
practice. Or at least it should be highlighted.

Can't you just use YAML !assert blocks and your 3 lines python
equivalent of assert_equals when YAML !assert doesn't work? It's
standard python and not that much longer.

What I'm saying is: Between yaml !assert, yaml !python blocks, and
unittests, I'm no sure the missing assert_equals is enough to justify
adding a "fake" dependency to the module, required only to run tests.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe