[Checkins] SVN: z3c.optionstorage/trunk/ A number of fixes to the
egg packaging and writing the first test that
Brian Sutherland
jinty at web.de
Wed Jul 4 03:03:14 EDT 2007
Log message for revision 77386:
A number of fixes to the egg packaging and writing the first test that
optionstorage has :(
Also, changing the key back to "optionstorage", so that we don't have to write
a generation script (schooltool's been using optionstorage for a while). I'm
pretty sure noone's downloaded/used this egg yet because the packaging was so
broken.
Thanks to ignas for trying to write the generation script and noticing the
errors.
Also cleanup some whitespace.
Changed:
U z3c.optionstorage/trunk/buildout.cfg
U z3c.optionstorage/trunk/setup.py
U z3c.optionstorage/trunk/src/z3c/optionstorage/__init__.py
A z3c.optionstorage/trunk/src/z3c/optionstorage/tests.py
-=-
Modified: z3c.optionstorage/trunk/buildout.cfg
===================================================================
--- z3c.optionstorage/trunk/buildout.cfg 2007-07-04 04:28:16 UTC (rev 77385)
+++ z3c.optionstorage/trunk/buildout.cfg 2007-07-04 07:03:08 UTC (rev 77386)
@@ -5,4 +5,4 @@
[test]
recipe = zc.recipe.testrunner
-eggs = optionstorage
+eggs = z3c.optionstorage
Modified: z3c.optionstorage/trunk/setup.py
===================================================================
--- z3c.optionstorage/trunk/setup.py 2007-07-04 04:28:16 UTC (rev 77385)
+++ z3c.optionstorage/trunk/setup.py 2007-07-04 07:03:08 UTC (rev 77386)
@@ -2,16 +2,16 @@
setup(
name = 'z3c.optionstorage',
- version = '0.1',
+ version = '0.1.1',
author = 'Zope Corporation and Contributors',
author_email = 'zope3-dev at zope.org',
description = '',
license = 'ZPL 2.1',
-
+ namespace_packages=['z3c'],
packages = find_packages('src'),
package_dir = {'': 'src'},
install_requires = ['setuptools',
- 'persistent',
+ 'ZODB3',
'zope.annotation',
'zope.configuration',
'zope.deprecation',
@@ -25,5 +25,6 @@
'zope.app.publisher',
'zope.app.form',
'zope.app.zapi'],
+ dependency_links=['http://download.zope.org/distribution/'],
zip_safe = False,
)
Modified: z3c.optionstorage/trunk/src/z3c/optionstorage/__init__.py
===================================================================
--- z3c.optionstorage/trunk/src/z3c/optionstorage/__init__.py 2007-07-04 04:28:16 UTC (rev 77385)
+++ z3c.optionstorage/trunk/src/z3c/optionstorage/__init__.py 2007-07-04 07:03:08 UTC (rev 77386)
@@ -24,7 +24,9 @@
from UserDict import IterableUserDict
-OptionStorageKey = "z3c.optionstorage"
+# This key should in theory be z3c.optionstorage, anyone wanting to change it
+# can write the generation script.
+OptionStorageKey = "optionstorage"
class Table(object):
# Based on zope's SecurityMap.
@@ -55,10 +57,10 @@
col = self._bycol.get(colkey)
if not col:
col = self._bycol[colkey] = {}
-
+
row[colkey] = value
col[rowkey] = value
-
+
self._changed()
return True
@@ -128,7 +130,16 @@
class OptionDict(Persistent):
+ """An option dict.
+ Test that OptionDict does actually provide it's interfaces:
+
+ >>> o = OptionDict()
+ >>> from zope.interface.verify import verifyObject
+ >>> verifyObject(IOptionDict, o)
+ True
+
+ """
implements(IOptionDict)
def __init__(self):
@@ -195,8 +206,9 @@
return storage[name]
return None
+
class OptionStorageProperty(object):
-
+
def __init__(self, name, dictname, islist=False, readonly=False):
self._name = name
self._dictname = dictname
Added: z3c.optionstorage/trunk/src/z3c/optionstorage/tests.py
===================================================================
--- z3c.optionstorage/trunk/src/z3c/optionstorage/tests.py (rev 0)
+++ z3c.optionstorage/trunk/src/z3c/optionstorage/tests.py 2007-07-04 07:03:08 UTC (rev 77386)
@@ -0,0 +1,18 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+from zope.testing import doctest
+
+def test_suite():
+ return doctest.DocTestSuite('z3c.optionstorage')
Property changes on: z3c.optionstorage/trunk/src/z3c/optionstorage/tests.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list