Replace test setuptools command by unittest discover
This commit is contained in:
parent
836b78b11a
commit
6819d0ab8f
|
@ -18,7 +18,7 @@ class Work(AnalyticMixin, metaclass=PoolMeta):
|
|||
Eval('context', {}).get('company', -1),
|
||||
Eval('company', -1))),
|
||||
]
|
||||
cls.analytic_accounts.depends.append('company')
|
||||
cls.analytic_accounts.depends.add('company')
|
||||
|
||||
def _get_invoice_line(self, key, invoice, lines):
|
||||
"Return a invoice line for the lines"
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# This file is part analytic_project module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
from .test_analytic_project import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
# This file is part analytic_project module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
import unittest
|
||||
import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import suite as test_suite
|
||||
from trytond.tests.test_tryton import doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
|
||||
|
||||
class AnalyticProjectTestCase(ModuleTestCase):
|
||||
'Test Analytic Project module'
|
||||
module = 'analytic_project'
|
||||
|
||||
|
||||
def suite():
|
||||
suite = test_suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
AnalyticProjectTestCase))
|
||||
suite.addTests(doctest.DocFileSuite('scenario_analytic_project.rst',
|
||||
tearDown=doctest_teardown, encoding='utf-8',
|
||||
checker=doctest_checker,
|
||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
||||
return suite
|
|
@ -0,0 +1,10 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class AnalyticProjectTestCase(ModuleTestCase):
|
||||
'Test Analytic Project Test module'
|
||||
module = 'analytic_project'
|
||||
|
||||
del ModuleTestCase
|
|
@ -0,0 +1,8 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.tests.test_tryton import load_doc_tests
|
||||
|
||||
|
||||
def load_tests(*args, **kwargs):
|
||||
return load_doc_tests(__name__, __file__, *args, **kwargs)
|
Loading…
Reference in New Issue