diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-06-19 11:45:38 +0100 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-06-19 11:45:38 +0100 |
commit | 8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc (patch) | |
tree | 199a8e4792f87c951fcf82197061c35e5805d100 /setuptools/tests/test_develop.py | |
parent | 744a61f18bbfcbf7dfaa08886185b4595d8b7bcb (diff) | |
parent | 5d9d3930f400a754f38be2a4de21a7f9ed00f5f4 (diff) | |
download | external_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.tar.gz external_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.tar.bz2 external_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.zip |
Merged upstream changes.
--HG--
branch : single-codebase
Diffstat (limited to 'setuptools/tests/test_develop.py')
-rw-r--r-- | setuptools/tests/test_develop.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index e2939fea..7b90161a 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -90,11 +90,15 @@ class TestDevelopTest(unittest.TestCase): # Check that we are using the right code. 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() + try: + path = egg_link_file.read().split()[0].strip() + finally: + egg_link_file.close() init_file = open(os.path.join(path, 'foo', '__init__.py'), 'rt') - init = init_file.read().strip() - init_file.close() + try: + init = init_file.read().strip() + finally: + init_file.close() if sys.version < "3": self.assertEqual(init, 'print "foo"') else: @@ -116,4 +120,3 @@ class TestDevelopTest(unittest.TestCase): pass finally: os.chdir(old_dir) - |