changeset 92f2a7c54470 in modules/account_de_skr03:default
details: 
https://hg.tryton.org/modules/account_de_skr03?cmd=changeset&node=92f2a7c54470
description:
        Replace test setuptools command by unittest discover

        issue9215
        review389851002
diffstat:

 setup.py                       |   2 --
 tests/__init__.py              |   8 --------
 tests/test_account_de_skr03.py |  18 ------------------
 tests/test_module.py           |  12 ++++++++++++
 tox.ini                        |   2 +-
 5 files changed, 13 insertions(+), 29 deletions(-)

diffs (74 lines):

diff -r cce552afc06c -r 92f2a7c54470 setup.py
--- a/setup.py  Sun Apr 10 19:11:37 2022 +0200
+++ b/setup.py  Sat Apr 16 18:30:16 2022 +0200
@@ -124,6 +124,4 @@
     [trytond.modules]
     account_de_skr03 = trytond.modules.account_de_skr03
     """,
-    test_suite='tests',
-    test_loader='trytond.test_loader:Loader',
     )
diff -r cce552afc06c -r 92f2a7c54470 tests/__init__.py
--- a/tests/__init__.py Sun Apr 10 19:11:37 2022 +0200
+++ b/tests/__init__.py Sat Apr 16 18:30:16 2022 +0200
@@ -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_de_skr03.tests.test_account_de_skr03 import \
-        suite  # noqa: E501
-except ImportError:
-    from .test_account_de_skr03 import suite
-
-__all__ = ['suite']
diff -r cce552afc06c -r 92f2a7c54470 tests/test_account_de_skr03.py
--- a/tests/test_account_de_skr03.py    Sun Apr 10 19:11:37 2022 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +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.tests.test_tryton import ModuleTestCase
-
-
-class AccountDESKR03TestCase(ModuleTestCase):
-    'Test Account DE SKR03 module'
-    module = 'account_de_skr03'
-
-
-def suite():
-    suite = trytond.tests.test_tryton.suite()
-    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
-        AccountDESKR03TestCase))
-    return suite
diff -r cce552afc06c -r 92f2a7c54470 tests/test_module.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test_module.py      Sat Apr 16 18:30:16 2022 +0200
@@ -0,0 +1,12 @@
+# 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.tests.test_tryton import ModuleTestCase
+
+
+class AccountDESKR03TestCase(ModuleTestCase):
+    'Test Account DE SKR03 module'
+    module = 'account_de_skr03'
+
+
+del ModuleTestCase
diff -r cce552afc06c -r 92f2a7c54470 tox.ini
--- a/tox.ini   Sun Apr 10 19:11:37 2022 +0200
+++ b/tox.ini   Sat Apr 16 18:30:16 2022 +0200
@@ -3,7 +3,7 @@
 
 [testenv]
 commands =
-    coverage run --include=.*/account_de_skr03/* setup.py test
+    coverage run --include=.*/account_de_skr03/* -m unittest discover -s tests
     coverage report --include=.*/account_de_skr03/* --omit=*/tests/*
 deps =
     coverage

Reply via email to