Skip to content
Snippets Groups Projects
Commit 6398b9fb authored by Cédric Krier's avatar Cédric Krier :atom:
Browse files

Replace test setuptools command by unittest discover

issue9215
review389851002
parent 7d994ce6
No related branches found
No related tags found
1 merge request!114Return an empty list when the treeview has no selection
......@@ -135,9 +135,12 @@
license='GPL-3',
python_requires='>=3.7',
install_requires=requires,
extras_require={
'test': tests_require,
},
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
account_eu = trytond.modules.account_eu
""",
......@@ -138,10 +141,7 @@
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
account_eu = trytond.modules.account_eu
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
)
# 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_eu.tests.test_account_eu import suite
except ImportError:
from .test_account_eu import suite
__all__ = ['suite']
# 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 trytond.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
......@@ -6,6 +4,5 @@
from trytond.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import suite as test_suite
class AccountEuTestCase(CompanyTestMixin, ModuleTestCase):
......@@ -13,8 +10,4 @@
module = 'account_eu'
def suite():
suite = test_suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountEuTestCase))
return suite
del ModuleTestCase
......@@ -2,4 +2,5 @@
envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
[testenv]
extras = test
commands =
......@@ -5,5 +6,5 @@
commands =
coverage run --include=.*/account_eu/* setup.py test
coverage run --include=.*/account_eu/* -m unittest discover -s tests
coverage report --include=.*/account_eu/* --omit=*/tests/*
deps =
coverage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment