Replace test setuptools command by unittest discover
issue9215 review389851002
This commit is contained in:
@@ -144,6 +144,4 @@ setup(name=name,
|
||||
account_invoice_line_standalone = \
|
||||
trytond.modules.account_invoice_line_standalone
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
)
|
||||
|
||||
@@ -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_invoice_line_standalone.tests.test_account_invoice_line_standalone import \
|
||||
suite # noqa: E501
|
||||
except ImportError:
|
||||
from .test_account_invoice_line_standalone 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.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
@@ -11,8 +9,4 @@ class AccountInvoiceLineStandaloneTestCase(ModuleTestCase):
|
||||
module = 'account_invoice_line_standalone'
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
AccountInvoiceLineStandaloneTestCase))
|
||||
return suite
|
||||
del ModuleTestCase
|
||||
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
coverage run --include=.*/account_invoice_line_standalone/* setup.py test
|
||||
coverage run --include=.*/account_invoice_line_standalone/* -m unittest discover -s tests
|
||||
coverage report --include=.*/account_invoice_line_standalone/* --omit=*/tests/*
|
||||
deps =
|
||||
coverage
|
||||
|
||||
Reference in New Issue
Block a user