[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests - test_include.py:1.16

Fred L. Drake, Jr. fred at zope.com
Tue May 4 16:10:29 EDT 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv31943/zpkgtools/tests

Modified Files:
	test_include.py 
Log Message:
add Specifcation.__nonzero__ to allow a client to determine if processing
the specification will actually cause anything to happen


=== Packages/zpkgtools/zpkgtools/tests/test_include.py 1.15 => 1.16 ===
--- Packages/zpkgtools/zpkgtools/tests/test_include.py:1.15	Tue May  4 10:08:43 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_include.py	Tue May  4 16:10:29 2004
@@ -83,11 +83,15 @@
           """)
         specs = include.load(self.source)
         specs.collection.cook()
+        specs.distribution.cook()
         includes = specs.collection.includes
         self.assertEqual(len(includes), 3)
         self.assert_("newname1.txt" in includes)
         self.assert_("newname2.txt" in includes)
         self.assert_("runtests.py" in includes)
+        self.assert_(specs.loads)
+        self.assert_(specs.collection)
+        self.assert_(specs.distribution)
         self.assertEqual(specs.collection.includes["newname1.txt"],
                          "ignorethis.txt")
         self.assertEqual(specs.loads.includes["repository:doc/whatzit.txt"],
@@ -110,8 +114,12 @@
             """)
         specs = include.load(self.source)
         specs.collection.cook()
+        specs.distribution.cook()
         self.assertEqual(len(specs.collection.includes), 1)
         self.assert_("ignorethis.txt" in specs.collection.includes)
+        self.assert_(not specs.loads)
+        self.assert_(specs.collection)
+        self.assert_(not specs.distribution)
 
     def test_disallow_external_reference_in_collection_spec(self):
         self.check_disallow_external_reference_in_spec("collection")




More information about the Zope-CVS mailing list