diff options
-rwxr-xr-x | Lib/lib2to3/tests/test_fixers.py | 2 | ||||
-rwxr-xr-x | Lib/lib2to3/tests/test_pytree.py | 1 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_refactor.py | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py index a19de95..d071b2e 100755 --- a/Lib/lib2to3/tests/test_fixers.py +++ b/Lib/lib2to3/tests/test_fixers.py @@ -3556,7 +3556,7 @@ class Test_import(FixerTestCase): b = "import bar" a = "from . import bar" self.always_exists = False - self.present_files = set(["__init__.py", "bar/"]) + self.present_files = set(["__init__.py", "bar" + os.path.sep]) self.check(b, a) def test_comments_and_indent(self): diff --git a/Lib/lib2to3/tests/test_pytree.py b/Lib/lib2to3/tests/test_pytree.py index a162aae..870970c 100755 --- a/Lib/lib2to3/tests/test_pytree.py +++ b/Lib/lib2to3/tests/test_pytree.py @@ -31,6 +31,7 @@ class TestNodes(support.TestCase): def test_deprecated_prefix_methods(self): l = pytree.Leaf(100, "foo") with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) self.assertEqual(l.get_prefix(), "") l.set_prefix("hi") self.assertEqual(l.prefix, "hi") diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py index 39ed545..cc47b9d 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -46,6 +46,7 @@ class TestRefactoringTool(unittest.TestCase): def test_print_function_option(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always", DeprecationWarning) refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True}) self.assertEqual(len(w), 1) msg, = w |