Comments (13)
We shouldn't depend in anything outside OCA, so at first instance, it should be not.
from web.
Ok, then I will try to remove such tests and include some of them using nose (de official one)
from web.
@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.
@nhomar IMO, you don't need to refactor the tests. You just need to install anybox.testing.openerp with pip
from web.
OK, I didn't know about pip package existence. Sorry for the confusion.
from web.
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.
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.
@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.
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.
@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.
Can't this be solved by simply adding anybox.testing.openerp in external_dependencies
?
from web.
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.openerp
for 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.
As there's no PR changing tests, I close the issue.
from web.
Related Issues (20)
- Missing web_widget_text_markdown for newer versions HOT 3
- I would really like to get this module on version: 14.0 HOT 1
- causes a problem where the toolbar does not appear when text is selected in the editor within a popup window. web_responsive.scss file, specifically in lines 373-377. HOT 5
- [16.0] web_remember_tree_column_width: issues with HTML fields HOT 1
- [16.0] web_company_color: not working if not all colors are filled HOT 4
- [16.0] web_chatter_position: Button to switch between sided and bottom views HOT 2
- [16.0] web_responsive: document_url module is not working properly when installed
- [17.0] web_responsive: Main document preview is activated by default HOT 4
- [17.0]Can this module be migrated to the 17.0 version ?? HOT 6
- column width in tree view HOT 2
- [11.0] error install web_responsive module HOT 1
- [16.0] web_advanced_search bug HOT 7
- [16.0] web_responsive: The web responsive will revert back to odoo base behaviour when we reload the page from website. HOT 3
- [16.0] web_refresher: Refresh action returns to create a new record when already has been created the record HOT 3
- [16][web_responsive] Bold doest whows as normal text in HTML fields HOT 3
- web_widget_x2many_2d_matrix 17.0 can not edit the value
- [16.0] web_widget_x2many_2d_matrix: Error when value is Date HOT 1
- [16.0] web_responsive: The web responsive will revert back to odoo base behaviour when we reload the page from website. HOT 4
- [16.0] web_pivot_computed_measure - error when divide by 0
- [17.0] web_widget_x2many_2d_matrix - Domain is not taken into account
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.