aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_develop.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-12-29 06:23:09 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-12-29 06:23:09 +0100
commit721559fe76a1cda3de639ee2aaa446595169d26b (patch)
treea33afb83c609e4124c7f78fa79ded12f9f139f8a /setuptools/tests/test_develop.py
parent5f6ebc0579291a7dd316e2a64466e688ef7bdb69 (diff)
downloadexternal_python_setuptools-721559fe76a1cda3de639ee2aaa446595169d26b.tar.gz
external_python_setuptools-721559fe76a1cda3de639ee2aaa446595169d26b.tar.bz2
external_python_setuptools-721559fe76a1cda3de639ee2aaa446595169d26b.zip
Fix some ResourceWarnings.
--HG-- branch : distribute extra : rebase_source : 31ac3f0135d8cfe0fabc274f1649d1c99eba2868
Diffstat (limited to 'setuptools/tests/test_develop.py')
-rw-r--r--setuptools/tests/test_develop.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
index 3e071dad..315058c5 100644
--- a/setuptools/tests/test_develop.py
+++ b/setuptools/tests/test_develop.py
@@ -89,8 +89,12 @@ class TestDevelopTest(unittest.TestCase):
self.assertEqual(content, ['easy-install.pth', 'foo.egg-link'])
# Check that we are using the right code.
- path = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt').read().split()[0].strip()
- init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip()
+ egg_link_file = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt')
+ path = egg_link_file.read().split()[0].strip()
+ egg_link_file.close()
+ init_file = open(os.path.join(path, 'foo', '__init__.py'), 'rt')
+ init = init_file.read().strip()
+ init_file.close()
if sys.version < "3":
self.assertEqual(init, 'print "foo"')
else: