[Python-checkins] r74135 - in python/branches/py3k: Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_refactor.py

benjamin.peterson python-checkins at python.org
Tue Jul 21 14:51:07 CEST 2009


Author: benjamin.peterson
Date: Tue Jul 21 14:51:07 2009
New Revision: 74135
Log:
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 (2009年7月20日) | 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 (2009年7月20日) | 1 line
 
 placate windows
 ........
................
 r74123 | benjamin.peterson | 2009年07月20日 16:09:45 -0500 (2009年7月20日) | 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 (2009年7月20日) | 1 line
 
 try to make warning tests more robust
 ........
 r74122 | benjamin.peterson | 2009年07月20日 15:44:14 -0500 (2009年7月20日) | 1 line
 
 platform compat
 ........
................
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Lib/lib2to3/tests/test_fixers.py
 python/branches/py3k/Lib/lib2to3/tests/test_pytree.py
 python/branches/py3k/Lib/lib2to3/tests/test_refactor.py
Modified: python/branches/py3k/Lib/lib2to3/tests/test_fixers.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/tests/test_fixers.py	(original)
+++ python/branches/py3k/Lib/lib2to3/tests/test_fixers.py	Tue Jul 21 14:51:07 2009
@@ -3556,7 +3556,7 @@
 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):
Modified: python/branches/py3k/Lib/lib2to3/tests/test_pytree.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/tests/test_pytree.py	(original)
+++ python/branches/py3k/Lib/lib2to3/tests/test_pytree.py	Tue Jul 21 14:51:07 2009
@@ -31,6 +31,7 @@
 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")
Modified: python/branches/py3k/Lib/lib2to3/tests/test_refactor.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/tests/test_refactor.py	(original)
+++ python/branches/py3k/Lib/lib2to3/tests/test_refactor.py	Tue Jul 21 14:51:07 2009
@@ -46,6 +46,7 @@
 
 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 @@
 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):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /