[elbe-devel] [PATCH 07/10] elbepack: test_doctest; switch to pytest APIs
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Mar 11 18:03:00 CET 2024
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/test_doctest.py | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/elbepack/tests/test_doctest.py b/elbepack/tests/test_doctest.py
index 15b53778c1d4..ac09e8c456e1 100644
--- a/elbepack/tests/test_doctest.py
+++ b/elbepack/tests/test_doctest.py
@@ -6,15 +6,14 @@ import doctest
import elbepack.filesystem as filesystem
import elbepack.shellhelper as shellhelper
-from elbepack.commands.test import ElbeTestCase
-class ElbeDocTest(ElbeTestCase):
- def test_shellhelper(self):
- fail, _ = doctest.testmod(shellhelper)
- self.assertEqual(fail, 0)
+def test_shellhelper():
+ fail, _ = doctest.testmod(shellhelper)
+ assert fail == 0
- def test_filesystem(self):
- with filesystem.TmpdirFilesystem() as this:
- fail, _ = doctest.testmod(filesystem, extraglobs={'this': this})
- self.assertEqual(fail, 0)
+
+def test_filesystem():
+ with filesystem.TmpdirFilesystem() as this:
+ fail, _ = doctest.testmod(filesystem, extraglobs={'this': this})
+ assert fail == 0
--
2.44.0
More information about the elbe-devel
mailing list