def test_naming(self): for fn, name, ver, cname in [ ('NumPy-1.5-py2.6-win32.egg', 'NumPy', '1.5-py2.6-win32', 'numpy'), ('NumPy-1.5-2.egg', 'NumPy', '1.5-2', 'numpy'), ('NumPy-1.5.egg', 'NumPy', '1.5', 'numpy'), ]: self.assertEqual(name_version_fn(fn), (name, ver)) self.assertEqual(cname_fn(fn), cname) self.assertEqual(canonical(name), cname)
def test_cname_fn(self): self.assertEqual(cname_fn('VTK-5.4.2-1.egg'), 'vtk')