[elbe-devel] [PATCH 0/3] unittests start

Torben Hohn torben.hohn at linutronix.de
Wed Mar 11 15:30:59 CET 2020


On Thu, Mar 05, 2020 at 05:38:33PM -0500, Olivier Dion wrote:
> On Thu, 05 Mar 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> > This is a first go on unittests.
> >
> > Olivier is supposed to implement unittests soon. And we
> > have a few problems hiding in the copy_filelist() implementation
> > regarding symlinks.
> >
> > This is not yet ready to be merged, but it already points us
> > to the problems we currently see.
> >
> > Tests can be run using:
> >
> > python -m unittest discover
> > or 
> > python3 -m unittest discover
> >
> > note that python3 complains about the missing python3-spyne, while
> > scanning the soap modules.
> >
> > To lxcvs:linutronix/elbe/elbe
> >  * [new branch]          devel/torbenh/unittests -> devel/torbenh/unittests
> >
> >
> > Torben Hohn (3):
> >   tests: start with unittests by simply verifying the version
> >   tests efilesystem: add a test for copy_fileslist and usrmerge
> >   tests efilesystem: add deeplinks test for copy_filelist()
> >
> >  elbepack/tests/__init__.py         |  0
> >  elbepack/tests/test_efilesystem.py | 64 ++++++++++++++++++++++++++++++
> >  elbepack/tests/test_version.py     |  8 ++++
> >  3 files changed, 72 insertions(+)
> >  create mode 100644 elbepack/tests/__init__.py
> >  create mode 100644 elbepack/tests/test_efilesystem.py
> >  create mode 100644 elbepack/tests/test_version.py
> 
> I made some changes to your unit tests.  I've also fixed the
> copy_filelist, which should now handle nested symlinks.
> 
> git at lxcvs:linutronix/elbe/elbe.git devel/dion/unittests d4560a59..ce9d072f

please use prefixes with : in the first line of the commit log.

Basically the module name (efilesystem: for copy_filelist patches.)

Or "tests efilesystem:"

I am not happy with the removal of the test_ prefix, because the 
commandline to start the tests gets more complicated.


https://docs.python.org/3/library/unittest.html#load-tests-protocol

is there, and it should be possible, to remove the test_ prefix and
still use "python3 -m unittest discover"

I am still not conviced, that i like test modules without a prefix.
I mean, of course, they would still be in different directories.
But we would end up with identical filenames.




> 
> 
> 
> -- 
> Olivier Dion
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen

-- 
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