Giter VIP home page Giter VIP logo

Comments (13)

pedrobaeza avatar pedrobaeza commented on July 30, 2024

We shouldn't depend in anything outside OCA, so at first instance, it should be not.

from web.

nhomar avatar nhomar commented on July 30, 2024

Ok, then I will try to remove such tests and include some of them using nose (de official one)

from web.

lmignon avatar lmignon commented on July 30, 2024

@pedrobaeza, the depency rules is for modules not for python lib. anybox.testing.openerp is a pythonlib that ease the way to write tests for Odoo. IMO, the rule is not applicable to this case.

from web.

lmignon avatar lmignon commented on July 30, 2024

@nhomar IMO, you don't need to refactor the tests. You just need to install anybox.testing.openerp with pip

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

OK, I didn't know about pip package existence. Sorry for the confusion.

from web.

nhomar avatar nhomar commented on July 30, 2024

I know with a pip it can be solved, no issue with that, but until the rule is saves and anybox tests are under the OCA maintainance there is no way to have modules with such external dependencies which are redundant function from the core ones.

nosetest can do the same job (in a different way) but it can.

from web.

nhomar avatar nhomar commented on July 30, 2024

I read your test, and all what you do there with anybox can be done for sure with base test case. Can you enlight me what is the real difference between the tool you used and the unittest2 or nose?

from web.

lmignon avatar lmignon commented on July 30, 2024

@nhomar SharedSetupTransactionCase inherit from openerp.tests.common.SingleTransactionCase that inherit from BaseCase that inherit fom unittest2.TestCase. Therefore is a conventional unittest2.
SharedSetupTransactionCase provides a way to reduce the time required to run tests. It's not redundant to the core it's an enhancement of what is provided by the core. see https://bitbucket.org/anybox/anybox.testing.openerp#rst-header-sharedsetuptransactioncase

but until the rule is saves and anybox tests are under the OCA maintainance

Which rule? anybox.testing.openerp is a pythonlib. Do you expect that all the pythonlibs used by Odoo should be under the control of OCA or Odoo? (requests, libxml, ....)

IMO it's great to be able to use some lib that ease the way we can write tests.

from web.

nhomar avatar nhomar commented on July 30, 2024

2015-08-06 3:35 GMT-05:00 Laurent Mignon (ACSONE) [email protected]
:

Which rule? anybox.testing.openerp is a pythonlib. Do you expect that all
the pythonlibs used by Odoo should be under the control of OCA or Odoo?
(requests, libxml, ....)

No.

What I think is simple and straight forward.

IF: The extralib give me an really good enhancement.... coo! I installit
and all ok.

But If we have declared one repository and only for 1 tests which can be
done with base I need to dedicate to make a pip install with something not
which I do not know why it adds value, I stop and think.

And in this case I could not find any parst of your test that REALLY need
such library, all of it can be done without such dependency on the test.

I do not know if I explain myself better?

It is not a matter of:

Use or not Use because it is easy or not to install.

It is a matter of:

Let's use if we really need, because every package you add is a lot of
external thing over every one of us do not have contrl over it... then...
think it twice.

Regards.


Saludos Cordiales

CEO at Vauxoo https://www.vauxoo.com Odoo's Gold Partner.

[image: --]
Nhomar Hernandez
[image: http://]about.me/nhomar
http://about.me/nhomar?promo=email_sig

from web.

lmignon avatar lmignon commented on July 30, 2024

@nhomar you are free to change the code. The module has been developed in the context of a large project where we taken advantage of the functionalities provided by the SharedSetupTransactionCase to speed up our tests and ease their developments. The choice of using this library in our projects is a maturely considered choice.

from web.

sbidoul avatar sbidoul commented on July 30, 2024

Can't this be solved by simply adding anybox.testing.openerp in external_dependencies ?

from web.

nhomar avatar nhomar commented on July 30, 2024

@sbidoul

Yes, but the point is not which external dependency we should add, the point is that If the dependency really add a value in an specific OCA module then cool.

On this especific case and just on this specific case (I am not generalizing) it do not add any, because even such tests are possible to be done without such dependency.

And the impact of add an extra dependency is not always as simple as a sudo pip install everytime you decide use an external dependency you need to think that the one that will be using it sooner or later will need to mantain or add it to its deployment infraestructure, then such job (which is really necesary in some cases) need to be correctly supported.

In OCA, we encourage make tests with normal base ones, if the rule will be use anybox.testing.openerpfor any reason, then cool, we follow such lead, but in this case I actually do not understand why for one set of 2 or three modules which are using that I will change the deploy strategy of everybody and teh testing techniques.

I did not find "yet" teh technical reason to include such effort.

But BTW the module is there, as I mentioned, I will do it in some moment for now... No there are any issue with that.

I hope it clarify a little my point.

Regards.

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

As there's no PR changing tests, I close the issue.

from web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.