summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-07-21 13:13:16 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-07-21 13:13:16 (GMT)
commit784935ffc9cf097e698311c70bdff24250674df8 (patch)
tree9295050fe25a54c4f3f3286cfbc7f14f8b27889c /Lib
parentdd6a4edc4554cdb808f08a9ade7e40ed5addc94d (diff)
downloadcpython-784935ffc9cf097e698311c70bdff24250674df8.zip
cpython-784935ffc9cf097e698311c70bdff24250674df8.tar.gz
cpython-784935ffc9cf097e698311c70bdff24250674df8.tar.bz2
Merged revisions 74135 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74135 | benjamin.peterson | 2009-07-21 07:51:07 -0500 (Tue, 21 Jul 2009) | 31 lines Merged revisions 74117,74123 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r74117 | benjamin.peterson | 2009-07-20 12:24:30 -0500 (Mon, 20 Jul 2009) | 9 lines Merged revisions 74116 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r74116 | benjamin.peterson | 2009-07-20 12:22:35 -0500 (Mon, 20 Jul 2009) | 1 line placate windows ........ ................ r74123 | benjamin.peterson | 2009-07-20 16:09:45 -0500 (Mon, 20 Jul 2009) | 13 lines Merged revisions 74121-74122 via svnmerge from 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 ........ ................ ................
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py2
-rwxr-xr-xLib/lib2to3/tests/test_pytree.py1
-rw-r--r--Lib/lib2to3/tests/test_refactor.py3
3 files changed, 4 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index a25f5a8..d8218d3 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 b282cba..5ba23a5 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
@@ -215,7 +216,7 @@ from __future__ import print_function"""
expected = ["hi.py"]
check(tree, expected)
tree = ["hi.py",
- "a_dir/stuff.py"]
+ os.path.join("a_dir", "stuff.py")]
check(tree, tree)
def test_file_encoding(self):