[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests - test_app.py:1.13

Fred L. Drake, Jr. fred at zope.com
Thu May 27 10:32:18 EDT 2004


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

Modified Files:
	test_app.py 
Log Message:
Separate the meaning of the --application and --collection options; it is now
possible to generate an "application" distribution that does not collect
dependencies.


=== Packages/zpkgtools/zpkgtools/tests/test_app.py 1.12 => 1.13 ===
--- Packages/zpkgtools/zpkgtools/tests/test_app.py:1.12	Tue May  4 19:58:50 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_app.py	Thu May 27 10:32:14 2004
@@ -190,21 +190,47 @@
 
     def test_control_build_type(self):
         options = self.parse_args([])
-        self.assert_(options.build_type is None)
+        self.failIf(options.application)
+        self.failIf(options.collect)
         # collection
         # short arg:
         options = self.parse_args(["-c"])
-        self.assert_(options.build_type is "collection")
+        self.failIf(options.application)
+        self.failUnless(options.collect)
         # long arg:
         options = self.parse_args(["--collection"])
-        self.assert_(options.build_type is "collection")
+        self.failIf(options.application)
+        self.failUnless(options.collect)
         # application
         # short arg:
         options = self.parse_args(["-a"])
-        self.assert_(options.build_type is "application")
+        self.failUnless(options.application)
+        self.failIf(options.collect)
         # long arg:
         options = self.parse_args(["--application"])
-        self.assert_(options.build_type is "application")
+        self.failUnless(options.application)
+        self.failIf(options.collect)
+        # both
+        # short args:
+        options = self.parse_args(["-ac"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
+        options = self.parse_args(["-ca"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
+        options = self.parse_args(["-a", "-c"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
+        options = self.parse_args(["-c", "-a"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
+        # long args:
+        options = self.parse_args(["--application", "--collection"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
+        options = self.parse_args(["--collection", "--application"])
+        self.failUnless(options.application)
+        self.failUnless(options.collect)
 
 
 class ComponentTestCase(unittest.TestCase):




More information about the Zope-CVS mailing list