diff --git a/setup.py b/setup.py index 24f75f7ec3..ca390fec5e 100755 --- a/setup.py +++ b/setup.py @@ -142,6 +142,4 @@ setup(name=name, [trytond.modules] product_price_list = trytond.modules.product_price_list """, - test_suite='tests', - test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index 32beb877c7..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.product_price_list.tests.test_product_price_list import \ - suite # noqa: E501 -except ImportError: - from .test_product_price_list import suite - -__all__ = ['suite'] diff --git a/tests/test_product_price_list.py b/tests/test_module.py similarity index 97% rename from tests/test_product_price_list.py rename to tests/test_module.py index ca94d76d6e..5b2ccc7585 100644 --- a/tests/test_product_price_list.py +++ b/tests/test_module.py @@ -1,9 +1,8 @@ # 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 + from decimal import Decimal -import trytond.tests.test_tryton from trytond.modules.company.tests import ( CompanyTestMixin, create_company, set_company) from trytond.pool import Pool @@ -234,8 +233,4 @@ class ProductPriceListTestCase(CompanyTestMixin, ModuleTestCase): None) -def suite(): - suite = trytond.tests.test_tryton.suite() - suite.addTests(unittest.TestLoader().loadTestsFromTestCase( - ProductPriceListTestCase)) - return suite +del ModuleTestCase diff --git a/tox.ini b/tox.ini index 870a3cea5e..509cdb0058 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql} [testenv] commands = - coverage run --include=.*/product_price_list/* setup.py test + coverage run --include=.*/product_price_list/* -m unittest discover -s tests coverage report --include=.*/product_price_list/* --omit=*/tests/* deps = coverage