Community: Framework mailing list archives

Re: assert_equals in yaml python blocks

Leonardo Donelli
- 09/25/2014 03:59:09
2014-09-25 1:21 GMT+02:00 Alexandre Fayolle <>:
> Let's see things from another point of view.
> Let's say I decide to write tests for my module which use nose (for
> whatever reason).
> 1. if I don't declare nose as a dependency
> * you can install and use the module the module without installing nose
> * you cannot run the tests without installing nose, and you have to dig
> in the stack trace to understand that
> 2. if I declare nose as a dependency
> * Odoo will require that you install nose before you install the module
> * you will be able to use the module and run the tests
> The installation of nose in your dev environment costs almost nothing,
> does you no harm, and can ease the work of developers, which can find it
> easier to provide tests for their modules and to get meaningful error
> messages[1] in their tests. In my book, easing the maintenance work
> trumps easing deployment any time, especially when the deployment issue
> is a matter of apt-get install python-nose. It is not as if this was
> requiring you to setup an LDAP server which would only be used by tests.

Unfortunately a lot of users install Odoo on Windows, as you can see
from help questions on the help platform.
And even those on Linux may not be able to install system packages,
may be because they don't know how to do it, they are not allowed to
do it (they would need to ask their sysadmins), or incur in version
issues on other packaging problems while doing it. (see wkhtmltopdf,

So, on the other hand:
* Users (and, let's be honest, a large part of developers)  = the
largest audience, will never run tests, and they are also the
population which is more
  likely to incur in problems trying to install nose (or any other
system package)
* Developers who run tests will have absolutely no problem
understanding "ImportError: No module named nose" and installing it.

So, in my opinion it's either:
* Require it as a dependency, which would require anyone to install
it, even those who may not be able to do so without external help, and
don't even actually need it.
* Don't require it, which would impact only developers who want to run
tests on the module, which are:
* * fewer
* * Technical-savy (If they cannot understand "ImportError: no module
named nose" should be they developing in the frist place?
* * In a dev environment without restrictions, sysadmins, and all the
other stuff that comes with "enterprise deployment"