[Python-checkins] python/nondist/sandbox/setuptools/setuptools/tests test_resources.py, 1.13, 1.14
pje@users.sourceforge.net
pje at users.sourceforge.net
Sun Jul 17 06:42:44 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16754/setuptools/tests
Modified Files:
test_resources.py
Log Message:
Renamings for consistent terminology; distributions and requirements now
both have 'project_name' attributes, instead of one having 'name' and the
other 'distname'. Requirements no longer have 'options', they have
'extras'. This is the beginning of the terminology/architecture
refactoring described at:
http://mail.python.org/pipermail/distutils-sig/2005-June/004652.html
Index: test_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/tests/test_resources.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- test_resources.py 5 Jun 2005 21:33:51 -0000 1.13
+++ test_resources.py 17 Jul 2005 04:42:42 -0000 1.14
@@ -73,7 +73,7 @@
self.assertEqual(ad.best_match(req,path).version, '1.4')
def checkFooPkg(self,d):
- self.assertEqual(d.name, "FooPkg")
+ self.assertEqual(d.project_name, "FooPkg")
self.assertEqual(d.key, "foopkg")
self.assertEqual(d.version, "1.3-1")
self.assertEqual(d.py_version, "2.4")
@@ -83,7 +83,7 @@
def testDistroBasics(self):
d = Distribution(
"/some/path",
- name="FooPkg",version="1.3-1",py_version="2.4",platform="win32"
+ project_name="FooPkg",version="1.3-1",py_version="2.4",platform="win32"
)
self.checkFooPkg(d)
self.failUnless(d.installed_on(["/some/path"]))
@@ -99,7 +99,7 @@
def testDistroMetadata(self):
d = Distribution(
- "/some/path", name="FooPkg", py_version="2.4", platform="win32",
+ "/some/path", project_name="FooPkg", py_version="2.4", platform="win32",
metadata = Metadata(
('PKG-INFO',"Metadata-Version: 1.0\nVersion: 1.3-1\n")
)
@@ -250,8 +250,8 @@
r3 = Requirement.parse("Twisted[BAR,FOO]>=1.2.0")
self.assertEqual(r1,r2)
self.assertEqual(r1,r3)
- self.assertEqual(r1.options, ("foo","bar"))
- self.assertEqual(r2.options, ("bar","FOO"))
+ self.assertEqual(r1.extras, ("foo","bar"))
+ self.assertEqual(r2.extras, ("bar","FOO"))
self.assertEqual(hash(r1), hash(r2))
self.assertEqual(
hash(r1), hash(("twisted", ((">=",parse_version("1.2")),),
More information about the Python-checkins
mailing list