Source

distribute / setuptools / tests / test_develop.py

The branch 'default' does not exist.
Diff from to

File setuptools/tests/test_develop.py

         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: