Replace test setuptools command by unittest discover
issue9215 review389851002
This commit is contained in:
@@ -143,13 +143,13 @@ setup(name=name,
|
||||
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_es_sii = trytond.modules.account_es_sii
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
)
|
||||
|
||||
@@ -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.account_es_sii.tests.test_account_es_sii import \
|
||||
suite # noqa: E501
|
||||
except ImportError:
|
||||
from .test_account_es_sii import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
|
||||
@@ -1,7 +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 datetime
|
||||
import unittest
|
||||
from decimal import Decimal
|
||||
|
||||
from trytond.modules.account.tests import create_chart, get_fiscalyear
|
||||
@@ -9,9 +8,7 @@ from trytond.modules.account_invoice.tests import set_invoice_sequences
|
||||
from trytond.modules.company.tests import create_company, set_company
|
||||
from trytond.modules.currency.tests import add_currency_rate, create_currency
|
||||
from trytond.pool import Pool
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import suite as test_suite
|
||||
from trytond.tests.test_tryton import with_transaction
|
||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
|
||||
today = datetime.date.today()
|
||||
|
||||
@@ -529,8 +526,4 @@ class AccountEsSiiTestCase(ModuleTestCase):
|
||||
self.assertEqual(sii_invoice, [])
|
||||
|
||||
|
||||
def suite():
|
||||
suite = test_suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
AccountEsSiiTestCase))
|
||||
return suite
|
||||
del ModuleTestCase
|
||||
@@ -2,8 +2,9 @@
|
||||
envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
extras = test
|
||||
commands =
|
||||
coverage run --include=.*/account_es_sii/* setup.py test
|
||||
coverage run --include=.*/account_es_sii/* -m unittest discover -s tests
|
||||
coverage report --include=.*/account_es_sii/* --omit=*/tests/*
|
||||
deps =
|
||||
coverage
|
||||
|
||||
Reference in New Issue
Block a user