From 6b28efd56739606c0489a80b9fe58815264bcf82 2013-07-24 02:19:46 From: David Wolever Date: 2013-07-24 02:19:46 Subject: [PATCH] py3 doesn't have nested, py2.6 doesn't have multiple context managers --- diff --git a/IPython/utils/tests/test_path.py b/IPython/utils/tests/test_path.py index ee0fdb0..1452287 100644 --- a/IPython/utils/tests/test_path.py +++ b/IPython/utils/tests/test_path.py @@ -18,7 +18,7 @@ import os import shutil import sys import tempfile -from contextlib import contextmanager, nested +from contextlib import contextmanager from os.path import join, abspath, split @@ -583,8 +583,9 @@ class TestLinkOrCopy(object): "%r and %r do not reference the same indoes" %(a, b)) def assert_content_equal(self, a, b): - with nested(open(a), open(b)) as (a_f, b_f): - nt.assert_equals(a_f.read(), b_f.read()) + with open(a) as a_f: + with open(b) as b_f: + nt.assert_equals(a_f.read(), b_f.read()) @skip_win32 def test_link_successful(self):