Replace test setuptools command by unittest discover

issue9215
review389851002
This commit is contained in:
Cédric Krier
2022-04-16 18:30:15 +02:00
parent e58e2868c9
commit aef4cfd201
4 changed files with 2 additions and 17 deletions
-2
View File
@@ -124,6 +124,4 @@ setup(name=name,
[trytond.modules]
account_be = trytond.modules.account_be
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)
-7
View File
@@ -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.account_be.tests.test_account_be import suite
except ImportError:
from .test_account_be import suite
__all__ = ['suite']
@@ -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.account.tests import create_chart
from trytond.modules.company.tests import create_company, set_company
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
@@ -20,8 +18,4 @@ class AccountBETestCase(ModuleTestCase):
create_chart(company, chart=self.module + '.root_' + self.language)
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountBETestCase))
return suite
del ModuleTestCase
+1 -1
View File
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
[testenv]
commands =
coverage run --include=.*/account_be/* setup.py test
coverage run --include=.*/account_be/* -m unittest discover -s tests
coverage report --include=.*/account_be/* --omit=*/tests/*
deps =
coverage