[Python-checkins] python/nondist/sandbox/setuptools/setuptools/tests test_resources.py, 1.19, 1.20

pje@users.sourceforge.net pje at users.sourceforge.net
Mon Jul 25 05:12:54 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv750/setuptools/tests

Modified Files:
	test_resources.py 
Log Message:
Misc. bug fixes and doc additions.  Add 'iter_entry_points()' API.


Index: test_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/tests/test_resources.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- test_resources.py	24 Jul 2005 22:47:06 -0000	1.19
+++ test_resources.py	25 Jul 2005 03:12:51 -0000	1.20
@@ -216,16 +216,20 @@
             "foo = setuptools.tests.test_resources:EntryPointTests [x]"
         )
 
+    def setUp(self):
+        self.dist = Distribution.from_filename(
+            "FooPkg-1.2-py2.4.egg", metadata=Metadata(('requires.txt','[x]')))
+
     def testBasics(self):
         ep = EntryPoint(
             "foo", "setuptools.tests.test_resources", ["EntryPointTests"],
-            ["x"]
+            ["x"], self.dist
         )
         self.assertfields(ep)
 
     def testParse(self):
         s = "foo = setuptools.tests.test_resources:EntryPointTests [x]"
-        ep = EntryPoint.parse(s)
+        ep = EntryPoint.parse(s, self.dist)
         self.assertfields(ep)
 
         ep = EntryPoint.parse("bar baz=  spammity[PING]")
@@ -240,10 +244,6 @@
         self.assertEqual(ep.attrs, ("foo",))
         self.assertEqual(ep.extras, ())
 
-
-
-
-
     def testRejects(self):
         for ep in [
             "foo", "x=1=2", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2",



More information about the Python-checkins mailing list