One final test module to port to Python 3 (nominally).
This commit is contained in:
parent
15399b8eba
commit
930329126d
|
@ -2,6 +2,16 @@
|
||||||
Tests to check for Python2 regressions
|
Tests to check for Python2 regressions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from __future__ import division
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
from unittest import skipUnless
|
||||||
from inspect import isclass
|
from inspect import isclass
|
||||||
|
|
||||||
from twisted.python.modules import getModule
|
from twisted.python.modules import getModule
|
||||||
|
@ -37,10 +47,12 @@ def defined_here(cls, where):
|
||||||
"""
|
"""
|
||||||
return cls.__module__ == where
|
return cls.__module__ == where
|
||||||
|
|
||||||
|
|
||||||
class PythonTwoRegressions(TestCase):
|
class PythonTwoRegressions(TestCase):
|
||||||
"""
|
"""
|
||||||
Regression tests for Python 2 behaviors related to Python 3 porting.
|
Regression tests for Python 2 behaviors related to Python 3 porting.
|
||||||
"""
|
"""
|
||||||
|
@skipUnless(PY2, "No point in running on Python 3.")
|
||||||
def test_new_style_classes(self):
|
def test_new_style_classes(self):
|
||||||
"""
|
"""
|
||||||
All classes in Tahoe-LAFS are new-style.
|
All classes in Tahoe-LAFS are new-style.
|
||||||
|
|
|
@ -240,6 +240,7 @@ PORTED_TEST_MODULES = [
|
||||||
"allmydata.test.test_node",
|
"allmydata.test.test_node",
|
||||||
"allmydata.test.test_observer",
|
"allmydata.test.test_observer",
|
||||||
"allmydata.test.test_pipeline",
|
"allmydata.test.test_pipeline",
|
||||||
|
"allmydata.test.test_python2_regressions",
|
||||||
"allmydata.test.test_python3",
|
"allmydata.test.test_python3",
|
||||||
"allmydata.test.test_repairer",
|
"allmydata.test.test_repairer",
|
||||||
"allmydata.test.test_runner",
|
"allmydata.test.test_runner",
|
||||||
|
|
Loading…
Reference in New Issue