#140 Convert tests to use python3
Merged by rcritten. Opened by rcritten.
rcritten/certmonger python3  into  master

https://pagure.io/certmonger/issue/138

Signed-off-by: Rob Crittenden rcritten@redhat.com
With contributions from Stanislav Levin slev@altlinux.org

@slev this is my take on it. I pulled your PYTHON abstraction and better way to handle the sys.stdout.write change in tests/038-ms-v2-template/extract-extdata.py but otherwise they are very similar.

@rcritten, my version included only the minimal required changes (for possible backports).
I understand that you replaced tabs with spaces, but this mangles the target changes.
I would move indentation switch to a separate commit, but of course, this is up to you ;-)

Another difference is that Element.getchildren() method is deprecated:
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

There are warnings about it in 028-dbus/actual.err.

rebased onto e1f582e34fdd3224c01c842a9214d2950778de80

Changes applied.

  • Dropped all non-necessary reformatting (this is more minimal than yours)
  • droped refs to getchildren
  • I had a sed to replace dates with the string "date", I dropped that
  • Improved commit message

:thumbsup: looks great.
Thank you!

Pull-Request has been merged by rcritten