diff --git a/setup.py b/setup.py index 20702f72c6..a7db427756 100755 --- a/setup.py +++ b/setup.py @@ -144,6 +144,4 @@ setup(name=name, account_invoice_line_standalone = \ trytond.modules.account_invoice_line_standalone """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index 4de3a430e0..4effdfa4a2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,10 +1,2 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. - -try: - from trytond.modules.account_invoice_line_standalone.tests.test_account_invoice_line_standalone import \ - suite # noqa: E501 -except ImportError: - from .test_account_invoice_line_standalone import suite - -__all__ = ['suite'] diff --git a/tests/test_account_invoice_line_standalone.py b/tests/test_module.py similarity index 59% rename from tests/test_account_invoice_line_standalone.py rename to tests/test_module.py index d7adc6c7dc..a3bfc572eb 100644 --- a/tests/test_account_invoice_line_standalone.py +++ b/tests/test_module.py @@ -1,8 +1,6 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -import unittest -import trytond.tests.test_tryton from trytond.tests.test_tryton import ModuleTestCase @@ -11,8 +9,4 @@ class AccountInvoiceLineStandaloneTestCase(ModuleTestCase): module = 'account_invoice_line_standalone' -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - AccountInvoiceLineStandaloneTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index 99bd1c6b5f..d2fa711724 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/account_invoice_line_standalone/* setup.py test + coverage run --include=.*/account_invoice_line_standalone/* -m unittest discover -s tests coverage report --include=.*/account_invoice_line_standalone/* --omit=*/tests/* deps = coverage