diff --git a/setup.py b/setup.py index 0bb746ece7..a32667f696 100755 --- a/setup.py +++ b/setup.py @@ -145,6 +145,4 @@ setup(name=name, [trytond.modules] timesheet = trytond.modules.timesheet """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index 3fc9d40489..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.timesheet.tests.test_timesheet import suite -except ImportError: - from .test_timesheet import suite - -__all__ = ['suite'] diff --git a/tests/test_timesheet.py b/tests/test_module.py similarity index 63% rename from tests/test_timesheet.py rename to tests/test_module.py index 997be1ffab..6664d524a9 100644 --- a/tests/test_timesheet.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.modules.company.tests import CompanyTestMixin from trytond.tests.test_tryton import ModuleTestCase @@ -12,8 +10,4 @@ class TimesheetTestCase(CompanyTestMixin, ModuleTestCase): module = 'timesheet' -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - TimesheetTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index 2d8abe3ff8..045de201c3 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/timesheet/* setup.py test + coverage run --include=.*/timesheet/* -m unittest discover -s tests coverage report --include=.*/timesheet/* --omit=*/tests/* deps = coverage