changeset eed190b6b725 in modules/project_plan:default
details:
https://hg.tryton.org/modules/project_plan?cmd=changeset&node=eed190b6b725
description:
Replace test setuptools command by unittest discover
issue9215
review389851002
diffstat:
setup.py | 2 --
tests/__init__.py | 7 -------
tests/test_module.py | 13 +++++++++++++
tests/test_project_plan.py | 19 -------------------
tox.ini | 2 +-
5 files changed, 14 insertions(+), 29 deletions(-)
diffs (75 lines):
diff -r d29ef8c30c53 -r eed190b6b725 setup.py
--- a/setup.py Sun Apr 10 19:11:39 2022 +0200
+++ b/setup.py Sat Apr 16 18:30:18 2022 +0200
@@ -142,6 +142,4 @@
[trytond.modules]
project_plan = trytond.modules.project_plan
""",
- test_suite='tests',
- test_loader='trytond.test_loader:Loader',
)
diff -r d29ef8c30c53 -r eed190b6b725 tests/__init__.py
--- a/tests/__init__.py Sun Apr 10 19:11:39 2022 +0200
+++ b/tests/__init__.py Sat Apr 16 18:30:18 2022 +0200
@@ -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.project_plan.tests.test_project_plan import suite
-except ImportError:
- from .test_project_plan import suite
-
-__all__ = ['suite']
diff -r d29ef8c30c53 -r eed190b6b725 tests/test_module.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test_module.py Sat Apr 16 18:30:18 2022 +0200
@@ -0,0 +1,13 @@
+# This file is part of Tryton. The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+
+from trytond.modules.company.tests import CompanyTestMixin
+from trytond.tests.test_tryton import ModuleTestCase
+
+
+class ProjectPlanTestCase(CompanyTestMixin, ModuleTestCase):
+ 'Test ProjectPlan module'
+ module = 'project_plan'
+
+
+del ModuleTestCase
diff -r d29ef8c30c53 -r eed190b6b725 tests/test_project_plan.py
--- a/tests/test_project_plan.py Sun Apr 10 19:11:39 2022 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# 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
-
-
-class ProjectPlanTestCase(CompanyTestMixin, ModuleTestCase):
- 'Test ProjectPlan module'
- module = 'project_plan'
-
-
-def suite():
- suite = trytond.tests.test_tryton.suite()
- suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
- ProjectPlanTestCase))
- return suite
diff -r d29ef8c30c53 -r eed190b6b725 tox.ini
--- a/tox.ini Sun Apr 10 19:11:39 2022 +0200
+++ b/tox.ini Sat Apr 16 18:30:18 2022 +0200
@@ -3,7 +3,7 @@
[testenv]
commands =
- coverage run --include=.*/project_plan/* setup.py test
+ coverage run --include=.*/project_plan/* -m unittest discover -s tests
coverage report --include=.*/project_plan/* --omit=*/tests/*
deps =
coverage