Commits

Anonymous committed d6ba14e

egg_info -> egginfo

  • Participants
  • Parent commits e18eb7c

Comments (0)

Files changed (2)

 # Utilities
 #
 
-def egg_info_dirname(name, version):
+def egginfo_dirname(name, version):
     """Returns the egg-info directory name of a project.
 
     ``name`` is converted to a standard distribution name any runs of
 #
 # function used to detect a PEP 376 .egg-info directory
 #
-def is_egg_info(path):
+def is_egginfo(path):
     """Returns True if `path` is an egg-info directory.
 
     Also makes sure it doesn't pick older versions by checking
                 location = self._local_path(location)
             yield location, md5, size
 
-    def get_egg_info_files(self, local=False):
+    def get_egginfo_files(self, local=False):
         """Iterates over the list of files located in the `.egg-info`
         directory.
 
                 return True
         return False
 
-    def get_egg_info_file(self, path, binary=False):
+    def get_egginfo_file(self, path, binary=False):
         """Returns a file instance on the path.
 
         If binary is True, opens the file in binary mode.
         # to minimize I/O
         for element in os.listdir(self.path):
             fullpath = join(self.path, element)
-            if is_egg_info(fullpath):
+            if is_egginfo(fullpath):
                 self.add(Distribution(fullpath))
 
     def __repr__(self):

File test_pkgutil.py

     location = os.path.join(site_packages, 'mercurial', 'filelog.py')
     assert_equals(files[0], (location, '98676876876876', '12'))
 
-    f = dist.get_egg_info_file('RECORD')
+    f = dist.get_egginfo_file('RECORD')
     record = os.path.join(SITE_PKG, 'mercurial-1.0.1.egg-info', 'RECORD')
     assert_equals(open(record).read(), f.read())
 
     assert dist.uses('mercurial/filelog.py')
     assert not dist.uses('mercurial/filelog.sasasasa')
 
-    assert_equals(list(dist.get_egg_info_files()),
+    assert_equals(list(dist.get_egginfo_files()),
                   ['mercurial-1.0.1.egg-info/PKG_INFO',
                    'mercurial-1.0.1.egg-info/RECORD'])
 
-    assert_equals(list(dist.get_egg_info_files(local=True)),
+    assert_equals(list(dist.get_egginfo_files(local=True)),
                   [os.path.join(SITE_PKG, 'mercurial-1.0.1.egg-info/PKG_INFO'),
                    os.path.join(SITE_PKG, 'mercurial-1.0.1.egg-info/RECORD')])
 
     users = list(get_file_users('mercurial/filelog.py'))
     assert_equals(len(users), 2)
 
-def test_egg_info_dirname():
-    assert egg_info_dirname('zlib', '2.5.2') == 'zlib-2.5.2.egg-info'
-    assert egg_info_dirname('python-ldap', '2.5'), 'python_ldap-2.5.egg-info'
-    assert egg_info_dirname('python-ldap', '2.5 a---5'), 'python_ldap-2.5.a_5.egg-info'
+def test_egginfo_dirname():
+    assert egginfo_dirname('zlib', '2.5.2') == 'zlib-2.5.2.egg-info'
+    assert egginfo_dirname('python-ldap', '2.5'), 'python_ldap-2.5.egg-info'
+    assert egginfo_dirname('python-ldap', '2.5 a---5'), 'python_ldap-2.5.a_5.egg-info'