diff --git a/setup.py b/setup.py index 17e01fc3c8..0888b0b6f0 100755 --- a/setup.py +++ b/setup.py @@ -142,6 +142,4 @@ setup(name=name, [trytond.modules] carrier = trytond.modules.carrier """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index 28f8675111..4effdfa4a2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,9 +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.carrier.tests.test_carrier import suite -except ImportError: - from .test_carrier import suite - -__all__ = ['suite'] diff --git a/tests/test_carrier.py b/tests/test_module.py similarity index 56% rename from tests/test_carrier.py rename to tests/test_module.py index 27158bd070..08f6a591ad 100644 --- a/tests/test_carrier.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 CarrierTestCase(ModuleTestCase): module = 'carrier' -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - CarrierTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index b3f821335f..b1c4241558 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/carrier/* setup.py test + coverage run --include=.*/carrier/* -m unittest discover -s tests coverage report --include=.*/carrier/* --omit=*/tests/* deps = coverage