Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Speed of the tests in v8

by
n.schmitt
- 01/22/2016 12:17:16
Hi Leonardo.

I have been reviewing the errors, and it seems that the test file is run
within its module, but also with the modules depending on it loaded.
Let's say if B depends on A, then when I am running A with --test-file,
B is loaded as well, and obviously the tests of A suppose that B is not
"installed".

I guess the problem is that only the dependencies of A should be loaded,
not the modules depending on it.

On some simpler test files, it does work ok.

These errors appear be it issuing ./openerp-server ...
--test-file=, and using our anybox.recipe example with
nosetests.

Also I have many mock errors. I am using @patch.object, I guess that I
have to import the classes in another way knowing the setup is
different.
-- 
Nicolas Schmitt
Coordinador del Departamento de Tecnología e Información
PROTELCOTELSA SA
On 22/01/16, Leonardo Pistone wrote:
> On Fri, Jan 22, 2016 at 4:34 PM, Nicolas Schmitt
> <n.schmitt@protelcotelsa.com> wrote:
> > The thing is: it seems I have exactly the same errors than when using
> > the --test-file= flag.
> Which errors?
> > Maybe the updating process?
> Yes. When you `--test-enable`, the tests are run as soon as each
> module is loaded and updated. That could have some side effects,
> because for example modules depending on your module have not been
> loaded yet.
> With this anybox+nose setup, all modules are loaded beforehand.
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-framework-62 [1]
> Post to: mailto:expert-framework@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe [2]
> 
> 
> 
> [1] https://www.odoo.com/groups/community-framework-62
> [2] https://www.odoo.com/groups?unsubscribe