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 a0e247f050
commit 5c6e2842cd
4 files changed
+2 -17

No files matched your search

-2
View File
@@ -145,6 +145,4 @@ setup(name=name,
[trytond.modules]
timesheet = trytond.modules.timesheet
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
)
-7
View File
@@ -1,9 +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.timesheet.tests.test_timesheet import suite
except ImportError:
from .test_timesheet 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.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
@@ -12,8 +10,4 @@ class TimesheetTestCase(CompanyTestMixin, ModuleTestCase):
module = 'timesheet'
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
TimesheetTestCase))
return suite
del ModuleTestCase
+1 -1
View File
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
[testenv]
commands =
coverage run --include=.*/timesheet/* setup.py test
coverage run --include=.*/timesheet/* -m unittest discover -s tests
coverage report --include=.*/timesheet/* --omit=*/tests/*
deps =
coverage