Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c883265

Browse files
committed
Merged revisions 74117,74123 via svnmerge from
svn+ssh://[email protected]/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://[email protected]/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://[email protected]/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 ........ ................
1 parent bfc3099 commit c883265

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/lib2to3/tests/test_fixers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3556,7 +3556,7 @@ def test_import_from_package(self):
35563556
b = "import bar"
35573557
a = "from . import bar"
35583558
self.always_exists = False
3559-
self.present_files = set(["__init__.py", "bar/"])
3559+
self.present_files = set(["__init__.py", "bar" + os.path.sep])
35603560
self.check(b, a)
35613561

35623562
def test_comments_and_indent(self):

Lib/lib2to3/tests/test_pytree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class TestNodes(support.TestCase):
3131
def test_deprecated_prefix_methods(self):
3232
l = pytree.Leaf(100, "foo")
3333
with warnings.catch_warnings(record=True) as w:
34+
warnings.simplefilter("always", DeprecationWarning)
3435
self.assertEqual(l.get_prefix(), "")
3536
l.set_prefix("hi")
3637
self.assertEqual(l.prefix, "hi")

Lib/lib2to3/tests/test_refactor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def rt(self, options=None, fixers=_DEFAULT_FIXERS, explicit=None):
4646

4747
def test_print_function_option(self):
4848
with warnings.catch_warnings(record=True) as w:
49+
warnings.simplefilter("always", DeprecationWarning)
4950
refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True})
5051
self.assertEqual(len(w), 1)
5152
msg, = w
@@ -215,7 +216,7 @@ def mock_refactor_file(self, f, *args):
215216
expected = ["hi.py"]
216217
check(tree, expected)
217218
tree = ["hi.py",
218-
"a_dir/stuff.py"]
219+
os.path.join("a_dir", "stuff.py")]
219220
check(tree, tree)
220221

221222
def test_file_encoding(self):

0 commit comments

Comments
 (0)