diff options
author | 2020-01-25 22:18:16 +0100 | |
---|---|---|
committer | 2020-01-25 23:41:54 +0100 | |
commit | 072f84374cad2ff4347474d1edf05a5dff44970e (patch) | |
tree | f6e997087a94b14933ecde9862877408e76e6495 | |
parent | Mass-apply 2to3 (diff) | |
download | metagen-072f84374cad2ff4347474d1edf05a5dff44970e.tar.gz metagen-072f84374cad2ff4347474d1edf05a5dff44970e.tar.bz2 metagen-072f84374cad2ff4347474d1edf05a5dff44970e.zip |
metagenerator.py: Fix execution of tests for Python 3
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
-rwxr-xr-x | metagen/metagenerator.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/metagen/metagenerator.py b/metagen/metagenerator.py index 87bd0f6..fd00caa 100755 --- a/metagen/metagenerator.py +++ b/metagen/metagenerator.py @@ -49,14 +49,14 @@ class MyMetadata(jaxml.XML_document): self.longdescription(longdesc) def do_tests(): - from . import meta_unittest + from metagen import meta_unittest fails = 0 for func in dir(meta_unittest): if func[0:4] == "test": try: - exec("print meta_unittest.%s.__name__ + ':'," % func) - exec("print meta_unittest.%s.__doc__" % func) - exec("print meta_unittest.%s()" % func) + exec("print(meta_unittest.%s.__name__ + ':', end='')" % func) + exec("print(meta_unittest.%s.__doc__)" % func) + exec("print(meta_unittest.%s())" % func) except: fails += 1 print("Test %s failed:" % func) |