[elbe-devel] [PATCH 2/5] tests test_doctest: Add unittest for doctests
Torben Hohn
torben.hohn at linutronix.de
Mon May 25 14:59:16 CEST 2020
On Mon, May 18, 2020 at 10:09:57AM -0400, Olivier Dion wrote:
> 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
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list