Replace test setuptools command by unittest discover
issue9215 review389851002
This commit is contained in:
1 parent
faa70507d4
commit
426a6ae608
4 files changed
+2
-18
No files matched your search
@@ -142,6 +142,4 @@ setup(name=name,
|
||||
[trytond.modules]
|
||||
product_attribute = trytond.modules.product_attribute
|
||||
""",
|
||||
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.product_attribute.tests.test_product_attribute import \
|
||||
suite # noqa: E501
|
||||
except ImportError:
|
||||
from .test_product_attribute 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 ProductTestCase(ModuleTestCase):
|
||||
module = 'product_attribute'
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
ProductTestCase))
|
||||
return suite
|
||||
del ModuleTestCase
|
||||
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
coverage run --include=.*/product_attribute/* setup.py test
|
||||
coverage run --include=.*/product_attribute/* -m unittest discover -s tests
|
||||
coverage report --include=.*/product_attribute/* --omit=*/tests/*
|
||||
deps =
|
||||
coverage
|
||||
|
||||
Reference in new issue
Block a user