[elbe-devel] [PATCH v2 2/6] tests test_doctest: Add unittest for doctests

Olivier Dion dion at linutronix.de
Mon May 25 20:25:52 CEST 2020


To add more module to test against doctest, simply add a
'doctest.DocTestSuite(MODULE)' using 'test.addTests'.

Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/tests/test_doctest.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 elbepack/tests/test_doctest.py

diff --git a/elbepack/tests/test_doctest.py b/elbepack/tests/test_doctest.py
new file mode 100644
index 00000000..598c2d17
--- /dev/null
+++ b/elbepack/tests/test_doctest.py
@@ -0,0 +1,13 @@
+# ELBE - Debian Based Embedded Rootfilesystem Builder
+# Copyright (c) 2020 Olivier Dion <dion at linutronix.de>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+import doctest
+import unittest
+
+import elbepack.shellhelper as shellhelper
+
+def load_tests(loader, tests, ignore):
+    tests.addTests(doctest.DocTestSuite(shellhelper))
+    return tests
-- 
2.26.2




More information about the elbe-devel mailing list