Port to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2020-07-15 11:05:23 -04:00
parent d316ad3ebd
commit 093125ca43
3 changed files with 22 additions and 0 deletions

View File

@ -1,6 +1,16 @@
""" """
Tests for allmydata.util.hashutil. Tests for allmydata.util.hashutil.
Ported to Python 3.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:
from builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, int, list, object, range, str, max, min # noqa: F401
from twisted.trial import unittest from twisted.trial import unittest

View File

@ -1,6 +1,16 @@
""" """
Tests for allmydata.util.netstring. Tests for allmydata.util.netstring.
Ported to Python 3.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:
from builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, int, list, object, range, str, max, min # noqa: F401
from twisted.trial import unittest from twisted.trial import unittest

View File

@ -30,7 +30,9 @@ PORTED_TEST_MODULES = [
"allmydata.test.test_base32", "allmydata.test.test_base32",
"allmydata.test.test_base62", "allmydata.test.test_base62",
"allmydata.test.test_deferredutil", "allmydata.test.test_deferredutil",
"allmydata.test.test_hashutil",
"allmydata.test.test_humanreadable", "allmydata.test.test_humanreadable",
"allmydata.test.test_netstring",
"allmydata.test.test_python3", "allmydata.test.test_python3",
] ]