[Checkins] SVN: Sandbox/darrylcousins/mars. Writing tests

Darryl Cousins darryl at darrylcousins.net.nz
Mon Jul 16 08:35:10 EDT 2007


Log message for revision 78027:
  Writing tests

Changed:
  U   Sandbox/darrylcousins/mars.contentprovider/setup.py
  U   Sandbox/darrylcousins/mars.contentprovider/src/mars/contentprovider/contentprovider.txt
  U   Sandbox/darrylcousins/mars.formdemo/setup.py
  U   Sandbox/darrylcousins/mars.layer/src/mars/layer/tests.py
  U   Sandbox/darrylcousins/mars.macro/src/mars/macro/ftests/test_functional.py

-=-
Modified: Sandbox/darrylcousins/mars.contentprovider/setup.py
===================================================================
--- Sandbox/darrylcousins/mars.contentprovider/setup.py	2007-07-16 12:34:43 UTC (rev 78026)
+++ Sandbox/darrylcousins/mars.contentprovider/setup.py	2007-07-16 12:35:09 UTC (rev 78027)
@@ -26,7 +26,6 @@
                 test=['zope.app.testing',
                       'mars.layer',
                       'mars.template',
-                      'zope.app.securitypolicy',
         ]
                 ),
     install_requires = [

Modified: Sandbox/darrylcousins/mars.contentprovider/src/mars/contentprovider/contentprovider.txt
===================================================================
--- Sandbox/darrylcousins/mars.contentprovider/src/mars/contentprovider/contentprovider.txt	2007-07-16 12:34:43 UTC (rev 78026)
+++ Sandbox/darrylcousins/mars.contentprovider/src/mars/contentprovider/contentprovider.txt	2007-07-16 12:35:09 UTC (rev 78027)
@@ -26,6 +26,8 @@
   >>> import zope.component
   >>> import grok
   >>> import mars.contentprovider
+  >>> import os, tempfile
+  >>> temp_dir = tempfile.mkdtemp()
 
 Define the content provider, note that none of the possible directives have been
 used. The default name that the provider is registered as is
@@ -83,8 +85,6 @@
 here: mars.layer, mars.template and mars.view but we will use the `vanilla` zope
 3 architecture.
 
-  >>> import os, tempfile
-  >>> temp_dir = tempfile.mkdtemp()
   >>> templateFileName = os.path.join(temp_dir, 'template.pt')
   >>> open(templateFileName, 'w').write('''
   ... <html>
@@ -137,3 +137,10 @@
 
 The use and testing of the available directives is done in the tests directory
 of this package.
+
+Cleanup
+-------
+
+  >>> import shutil
+  >>> shutil.rmtree(temp_dir)
+

Modified: Sandbox/darrylcousins/mars.formdemo/setup.py
===================================================================
--- Sandbox/darrylcousins/mars.formdemo/setup.py	2007-07-16 12:34:43 UTC (rev 78026)
+++ Sandbox/darrylcousins/mars.formdemo/setup.py	2007-07-16 12:35:09 UTC (rev 78027)
@@ -66,9 +66,9 @@
         'zc.resourcelibrary',
         'zc.table',
         'zope.annotation',
-                      'zope.contentprovider',
-                      'zope.app.catalog',
-                      'zope.app.folder',
+        'zope.contentprovider',
+        'zope.app.catalog',
+        'zope.app.folder',
         'zope.app.container',
         'zope.app.pagetemplate',
         'zope.app.session',

Modified: Sandbox/darrylcousins/mars.layer/src/mars/layer/tests.py
===================================================================
--- Sandbox/darrylcousins/mars.layer/src/mars/layer/tests.py	2007-07-16 12:34:43 UTC (rev 78026)
+++ Sandbox/darrylcousins/mars.layer/src/mars/layer/tests.py	2007-07-16 12:35:09 UTC (rev 78027)
@@ -19,6 +19,3 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
-
-
-

Modified: Sandbox/darrylcousins/mars.macro/src/mars/macro/ftests/test_functional.py
===================================================================
--- Sandbox/darrylcousins/mars.macro/src/mars/macro/ftests/test_functional.py	2007-07-16 12:34:43 UTC (rev 78026)
+++ Sandbox/darrylcousins/mars.macro/src/mars/macro/ftests/test_functional.py	2007-07-16 12:35:09 UTC (rev 78027)
@@ -25,7 +25,5 @@
         suite.addTest(test)
     return suite
 
-
-
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')



More information about the Checkins mailing list