diff --git a/setup.py b/setup.py index 881ee2d546..b417032ff1 100755 --- a/setup.py +++ b/setup.py @@ -142,6 +142,4 @@ setup(name=name, [trytond.modules] party_siret = trytond.modules.party_siret """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index 2216d3bc73..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.party_siret.tests.test_party_siret import suite -except ImportError: - from .test_party_siret import suite - -__all__ = ['suite'] diff --git a/tests/test_party_siret.py b/tests/test_module.py similarity index 57% rename from tests/test_party_siret.py rename to tests/test_module.py index 10904868c7..f370547835 100644 --- a/tests/test_party_siret.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 PartySiretTestCase(ModuleTestCase): module = 'party_siret' -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - PartySiretTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index cafb7c59ad..08624b0500 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/party_siret/* setup.py test + coverage run --include=.*/party_siret/* -m unittest discover -s tests coverage report --include=.*/party_siret/* --omit=*/tests/* deps = coverage