diff --git a/setup.py b/setup.py index 8d1ee8f86d..23fa811fd5 100755 --- a/setup.py +++ b/setup.py @@ -140,6 +140,4 @@ setup(name=name, [trytond.modules] dashboard = trytond.modules.dashboard """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index c6d91d9237..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.dashboard.tests.test_dashboard import suite -except ImportError: - from .test_dashboard import suite - -__all__ = ['suite'] diff --git a/tests/test_dashboard.py b/tests/test_module.py similarity index 74% rename from tests/test_dashboard.py rename to tests/test_module.py index 82bb11a397..de248dbfc5 100644 --- a/tests/test_dashboard.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.pool import Pool from trytond.tests.test_tryton import ModuleTestCase, with_transaction @@ -21,8 +19,4 @@ class DashboardTestCase(ModuleTestCase): self.assertIn('board', result['arch']) -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - DashboardTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index f3d3e95839..946a313dae 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/dashboard/* setup.py test + coverage run --include=.*/dashboard/* -m unittest discover -s tests coverage report --include=.*/dashboard/* --omit=*/tests/* deps = coverage