]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 74121-74122 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Mon, 20 Jul 2009 21:09:45 +0000 (21:09 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 20 Jul 2009 21:09:45 +0000 (21:09 +0000)
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r74121 | benjamin.peterson | 2009-07-20 15:40:59 -0500 (Mon, 20 Jul 2009) | 1 line

  try to make warning tests more robust
........
  r74122 | benjamin.peterson | 2009-07-20 15:44:14 -0500 (Mon, 20 Jul 2009) | 1 line

  platform compat
........

Lib/lib2to3/tests/test_fixers.py
Lib/lib2to3/tests/test_pytree.py
Lib/lib2to3/tests/test_refactor.py

index a19de9541d50874165cded4f7c8d8de3e9aba3d4..d071b2e22305cfdb8b5c319d5b7498f38ea0c363 100755 (executable)
@@ -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):
index a162aaebf90d4d04d58d15feb68374bdf907aad5..870970c6670fab5fcb6cf73180420792922df273 100755 (executable)
@@ -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")
index 39ed54508a3ac45d1b4fe39d28a75cef3fc72d68..cc47b9d9c244467d5db0d6c42eb96b4d79e70253 100644 (file)
@@ -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