Replace test setuptools command by unittest discover

issue9215
review389851002
This commit is contained in:
Cédric Krier committed 2022-04-16 18:30:20 +02:00
1 parent f2acbb0002
commit d23aa560b4
4 files changed
+4 -20

No files matched your search

-2
View File
@@ -141,6 +141,4 @@ setup(name=name,
[trytond.modules]
stock_supply_day = trytond.modules.stock_supply_day
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)
-8
View File
@@ -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.stock_supply_day.tests.test_stock_supply_day import \
suite # noqa: E501
except ImportError:
from .test_stock_supply_day import suite
__all__ = ['suite']
@@ -1,10 +1,8 @@
# 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
import trytond.tests.test_tryton
import datetime
from trytond.modules.account.tests import create_chart
from trytond.modules.company.tests import (
CompanyTestMixin, create_company, set_company)
@@ -153,8 +151,4 @@ class StockSupplyDayTestCase(CompanyTestMixin, ModuleTestCase):
return product_supplier
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
StockSupplyDayTestCase))
return suite
del ModuleTestCase
+1 -1
View File
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
[testenv]
commands =
coverage run --include=.*/stock_supply_day/* setup.py test
coverage run --include=.*/stock_supply_day/* -m unittest discover -s tests
coverage report --include=.*/stock_supply_day/* --omit=*/tests/*
deps =
coverage