Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4489)

Issue 194047: Refactor import_data (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by ced
Modified:
14 years, 2 months ago
Reviewers:
bch, h.goebel
Visibility:
Public.

Description

Rebirth of the patch from h.goebel - translate error message - handle numeric, date, datetime, reference fields - Improve relation search to fail if too much is found - Add unittest - Add escapechar '\' for ',' in many2many list

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix 80cols #

Unified diffs Side-by-side diffs Delta from patch set Stats (+830 lines, -135 lines) Patch
M trytond/ir/translation.py View 1 chunk +5 lines, -0 lines 0 comments Download
M trytond/ir/translation.xml View 1 chunk +45 lines, -0 lines 0 comments Download
M trytond/model/modelstorage.py View 3 chunks +198 lines, -134 lines 0 comments Download
M trytond/tests/__init__.py View 1 chunk +1 line, -0 lines 0 comments Download
M trytond/tests/__tryton__.py View 1 chunk +2 lines, -1 line 0 comments Download
A trytond/tests/import_data.py View 1 chunk +185 lines, -0 lines 0 comments Download
A trytond/tests/import_data.xml View 1 chunk +63 lines, -0 lines 0 comments Download
M trytond/tests/test_tryton.py View 1 2 chunks +331 lines, -0 lines 0 comments Download

Messages

Total messages: 5
ced
14 years, 2 months ago (2010-01-24 21:10:04 UTC) #1
bch
On 2010/01/24 21:10:04, ced wrote: > OK
14 years, 2 months ago (2010-01-25 13:49:36 UTC) #2
h.goebel
General remarks * Testsuite is to monolithic. Putting all tests in a single file will ...
14 years, 2 months ago (2010-01-26 07:39:13 UTC) #3
ced
On 2010/01/26 07:39:13, h.goebel wrote: > General remarks > > * Testsuite is to monolithic. ...
14 years, 2 months ago (2010-01-26 10:12:44 UTC) #4
ced
14 years, 2 months ago (2010-01-26 10:15:16 UTC) #5
http://codereview.appspot.com/194047/diff/1/9
File trytond/tests/test_tryton.py (right):

http://codereview.appspot.com/194047/diff/1/9#newcode2938
trytond/tests/test_tryton.py:2938: def test0010boolean(self):
On 2010/01/26 07:39:13, h.goebel wrote:
> A lot of redundant code here. You should use loops.

It is tests and I find it is more readable.

http://codereview.appspot.com/194047/diff/1/9#newcode3333
trytond/tests/test_tryton.py:3333: suite = suite()
On 2010/01/26 07:39:13, h.goebel wrote:
> All these lines should go into function suite().
> See http://docs.python.org/library/unittest.html#organizing-test-code, last
> quarter for how to use "suite()"

Yes, this is why it is done like that. Other modules will only need of the
DBTestCase.

http://codereview.appspot.com/194047/diff/1/9#newcode3333
trytond/tests/test_tryton.py:3333: suite = suite()
On 2010/01/26 07:39:13, h.goebel wrote:
> All these lines should go into function suite().
> See http://docs.python.org/library/unittest.html#organizing-test-code, last
> quarter for how to use "suite()"

Yes, this is why it is done like that. Other modules will only need of the
DBTestCase.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b