[Zodb-checkins] SVN: ZODB/trunk/src/ Bug fixed
Jim Fulton
jim at zope.com
Thu Sep 16 17:48:00 EDT 2010
Log message for revision 116470:
Bug fixed
The verbose mode of the fstest was broken.
(https://bugs.launchpad.net/zodb/+bug/475996)
Changed:
U ZODB/trunk/src/CHANGES.txt
U ZODB/trunk/src/ZODB/scripts/fstest.py
A ZODB/trunk/src/ZODB/scripts/tests/test_fstest.py
-=-
Modified: ZODB/trunk/src/CHANGES.txt
===================================================================
--- ZODB/trunk/src/CHANGES.txt 2010-09-16 21:23:27 UTC (rev 116469)
+++ ZODB/trunk/src/CHANGES.txt 2010-09-16 21:48:00 UTC (rev 116470)
@@ -28,6 +28,8 @@
- Setting _p_changed on a blob wo actually writing anything caused an
error. (https://bugs.launchpad.net/zodb/+bug/440234)
+- The verbose mode of the fstest was broken.
+ (https://bugs.launchpad.net/zodb/+bug/475996)
3.10.0b6 (2010-09-08)
=====================
Modified: ZODB/trunk/src/ZODB/scripts/fstest.py
===================================================================
--- ZODB/trunk/src/ZODB/scripts/fstest.py 2010-09-16 21:23:27 UTC (rev 116469)
+++ ZODB/trunk/src/ZODB/scripts/fstest.py 2010-09-16 21:48:00 UTC (rev 116470)
@@ -203,11 +203,14 @@
print __doc__
sys.exit(-1)
-def main():
+def main(args=None):
+ if args is None:
+ args = sys.argv[1:]
import getopt
+ global VERBOSE
try:
- opts, args = getopt.getopt(sys.argv[1:], 'v')
+ opts, args = getopt.getopt(args, 'v')
if len(args) != 1:
raise ValueError("expected one argument")
for k, v in opts:
Added: ZODB/trunk/src/ZODB/scripts/tests/test_fstest.py
===================================================================
--- ZODB/trunk/src/ZODB/scripts/tests/test_fstest.py (rev 0)
+++ ZODB/trunk/src/ZODB/scripts/tests/test_fstest.py 2010-09-16 21:48:00 UTC (rev 116470)
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2010 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 setupstack
+import doctest
+import ZODB
+
+def test_fstest_verbose():
+ r"""
+ >>> db = ZODB.DB('data.fs')
+ >>> db.close()
+ >>> import ZODB.scripts.fstest
+ >>> ZODB.scripts.fstest.main(['data.fs'])
+
+ >>> ZODB.scripts.fstest.main(['data.fs'])
+
+ >>> ZODB.scripts.fstest.main(['-v', 'data.fs'])
+ ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
+ 4: transaction tid ... #0
+ no errors detected
+
+ >>> ZODB.scripts.fstest.main(['-vvv', 'data.fs'])
+ ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
+ 52: object oid 0x0000000000000000 #0
+ 4: transaction tid ... #0
+ no errors detected
+
+ """
+
+
+def test_suite():
+ return doctest.DocTestSuite(
+ setUp=setupstack.setUpDirectory, tearDown=setupstack.tearDown)
+
Property changes on: ZODB/trunk/src/ZODB/scripts/tests/test_fstest.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
More information about the Zodb-checkins
mailing list