[Checkins] SVN: z3c.sessionwidget/trunk/ - Added doctest to ``long_description``.

Michael Howitz mh at gocept.com
Thu Oct 21 02:42:41 EDT 2010


Log message for revision 117801:
  - Added doctest to ``long_description``.
  
  - Added change log.
  
  - Removed ZPKG slugs and ZCML slugs.
  
  - Updated tests to run with current versions of the required packages.
  
  - Using Python's ``doctest`` module instead of depreacted
    ``zope.testing.doctestunit``.
  

Changed:
  A   z3c.sessionwidget/trunk/CHANGES.txt
  U   z3c.sessionwidget/trunk/setup.py
  U   z3c.sessionwidget/trunk/src/z3c/sessionwidget/README.txt
  D   z3c.sessionwidget/trunk/src/z3c/sessionwidget/SETUP.cfg
  U   z3c.sessionwidget/trunk/src/z3c/sessionwidget/tests.py
  D   z3c.sessionwidget/trunk/src/z3c/sessionwidget/z3c.sessionwidget-configure.zcml

-=-
Added: z3c.sessionwidget/trunk/CHANGES.txt
===================================================================
--- z3c.sessionwidget/trunk/CHANGES.txt	                        (rev 0)
+++ z3c.sessionwidget/trunk/CHANGES.txt	2010-10-21 06:42:40 UTC (rev 117801)
@@ -0,0 +1,17 @@
+============
+ Change log
+============
+
+0.1 (unreleased)
+----------------
+
+- Added doctest to ``long_description``.
+
+- Added change log.
+
+- Removed ZPKG slugs and ZCML slugs.
+
+- Updated tests to run with current versions of the required packages.
+
+- Using Python's ``doctest`` module instead of depreacted
+  ``zope.testing.doctestunit``.
\ No newline at end of file


Property changes on: z3c.sessionwidget/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Date
Added: svn:eol-style
   + native

Modified: z3c.sessionwidget/trunk/setup.py
===================================================================
--- z3c.sessionwidget/trunk/setup.py	2010-10-21 06:29:34 UTC (rev 117800)
+++ z3c.sessionwidget/trunk/setup.py	2010-10-21 06:42:40 UTC (rev 117801)
@@ -1,11 +1,23 @@
 from setuptools import setup, find_packages
+import os.path
 
+
+def read(*rnames):
+    text = open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+    return text + '\n\n'
+
+
 setup(
     name = "z3c.sessionwidget",
     version = "0.1dev",
     author = "Zope Contributors",
     author_email = "zope3-dev at zope.org",
     description = "Session Input Widget",
+    long_description=(
+        '.. contents::\n\n' +
+        read('CHANGES.txt') +
+        read('src', 'z3c', 'sessionwidget', 'README.txt')
+        ),
     license = "ZPL 2.1",
     keywords = "zope3 session widget",
     url = 'http://svn.zope.org/z3c.sessionwidget',

Modified: z3c.sessionwidget/trunk/src/z3c/sessionwidget/README.txt
===================================================================
--- z3c.sessionwidget/trunk/src/z3c/sessionwidget/README.txt	2010-10-21 06:29:34 UTC (rev 117800)
+++ z3c.sessionwidget/trunk/src/z3c/sessionwidget/README.txt	2010-10-21 06:42:40 UTC (rev 117801)
@@ -12,13 +12,13 @@
 object before the form's save button is pressed. This is, for example, the
 case when uploading images and displaying them right away as visual
 feedback. The object widget has the same problem when constructing sequences
-qith complex sub-items. In general it is up to the developer to decide when to
+with complex sub-items. In general it is up to the developer to decide when to
 present a new form or use the widget, but at least s/he should have the
 choice.
 
 To solve this problem, this package provides a widget that is only responsible
 for relaying the data of interest to a session. A sub-form or any other
-componentcan then use this session data and provide new data, if desired. The
+component can then use this session data and provide new data, if desired. The
 session data will also be publically available via a URL, so that the objects
 can also be displayed, such as images. This has the advantage that the data is
 *not* stored on the content until the overall form is submitted.
@@ -85,7 +85,7 @@
 The widget can directly access the session:
 
   >>> objWidget.session
-  <zope.app.session.session.SessionPkgData object at ...>
+  <zope.session.session.SessionPkgData object at ...>
   >>> objWidget.session.get('data', 'nothing')
   'nothing'
   >>> objWidget.session.get('changed', 'nothing')
@@ -103,7 +103,7 @@
   Traceback (most recent call last):
   ...
   MissingInputError: ('field.obj', u'Object', None)
-  
+
 This is satisfied by using a hidden field.
 
   >>> request.form['field.obj.used'] = ''
@@ -112,7 +112,7 @@
   >>> objWidget.getInputValue() is None
   Traceback (most recent call last):
   ...
-  WidgetInputError: ('obj', u'Object', )
+  WidgetInputError: ('obj', u'Object', RequiredMissing('obj'))
 
 Ups, we have a required field, so we need an accecptable Value. We can
 achieve this by setting the rendered value.

Deleted: z3c.sessionwidget/trunk/src/z3c/sessionwidget/SETUP.cfg
===================================================================
--- z3c.sessionwidget/trunk/src/z3c/sessionwidget/SETUP.cfg	2010-10-21 06:29:34 UTC (rev 117800)
+++ z3c.sessionwidget/trunk/src/z3c/sessionwidget/SETUP.cfg	2010-10-21 06:42:40 UTC (rev 117801)
@@ -1,3 +0,0 @@
-<data-files zopeskel/etc/package-includes>
-  z3c.sessionwidget-*.zcml
-</data-files>

Modified: z3c.sessionwidget/trunk/src/z3c/sessionwidget/tests.py
===================================================================
--- z3c.sessionwidget/trunk/src/z3c/sessionwidget/tests.py	2010-10-21 06:29:34 UTC (rev 117800)
+++ z3c.sessionwidget/trunk/src/z3c/sessionwidget/tests.py	2010-10-21 06:42:40 UTC (rev 117801)
@@ -11,20 +11,13 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Image Widgets Test
-
-$Id$
-"""
-__docformat__ = "reStructuredText"
 import doctest
-import unittest
 import zope.component
 from zope.app.session import interfaces
 from zope.app.session import session
 from zope.app.testing import placelesssetup
 from zope.app.session.http import CookieClientIdManager
 from zope.publisher.interfaces import IRequest
-from zope.testing.doctestunit import DocFileSuite
 
 
 def setUp(test):
@@ -39,17 +32,9 @@
         session.PersistentSessionDataContainer(),
         interfaces.ISessionDataContainer)
 
-def tearDown(test):
-    placelesssetup.tearDown()
 
-
 def test_suite():
-    return unittest.TestSuite((
-        DocFileSuite('README.txt',
-                     setUp=setUp, tearDown=tearDown,
-                     optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
-                     ),
-        ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
+    return doctest.DocFileSuite(
+        'README.txt',
+        setUp=setUp, tearDown=placelesssetup.tearDown(),
+        optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)

Deleted: z3c.sessionwidget/trunk/src/z3c/sessionwidget/z3c.sessionwidget-configure.zcml
===================================================================
--- z3c.sessionwidget/trunk/src/z3c/sessionwidget/z3c.sessionwidget-configure.zcml	2010-10-21 06:29:34 UTC (rev 117800)
+++ z3c.sessionwidget/trunk/src/z3c/sessionwidget/z3c.sessionwidget-configure.zcml	2010-10-21 06:42:40 UTC (rev 117801)
@@ -1 +0,0 @@
-<include package="z3c.sessionwidget" />



More information about the checkins mailing list