Ported to Python 3.

This commit is contained in:
Itamar Turner-Trauring 2020-11-09 14:15:40 -05:00
parent 2b9e269d3a
commit d31667d58c
2 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,14 @@
"""
Ported to Python 3.
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
from future.utils import PY2
if PY2:
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
import re
from twisted.trial import unittest
@ -24,7 +34,7 @@ class Update(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin):
self.nm = self.c.nodemaker
# self.data should be at least three segments long.
td = b"testdata "
self.data = td*(int(3*SEGSIZE/len(td))+10) # currently about 400kB
self.data = td*(int(3*SEGSIZE//len(td))+10) # currently about 400kB
assert len(self.data) > 3*SEGSIZE
self.small_data = b"test data" * 10 # 90 B; SDMF

View File

@ -108,6 +108,7 @@ PORTED_TEST_MODULES = [
"allmydata.test.mutable.test_repair",
"allmydata.test.mutable.test_roundtrip",
"allmydata.test.mutable.test_servermap",
"allmydata.test.mutable.test_update",
"allmydata.test.test_abbreviate",
"allmydata.test.test_base32",
"allmydata.test.test_base62",