Commit da54ebd6 authored by Jim Fulton's avatar Jim Fulton

Bug fixed

  The verbose mode of the fstest was broken.
  (https://bugs.launchpad.net/zodb/+bug/475996)
parent 06e77361
......@@ -28,6 +28,8 @@ Bugs fixed
- 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)
=====================
......
......@@ -203,11 +203,14 @@ def usage():
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:
......
##############################################################################
#
# 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment