Skip to content

Commit

Permalink
Merged from trunk:
Browse files Browse the repository at this point in the history
  r27323 | jim | 2004-08-28 15:31:22 -0400 (Sat, 28 Aug 2004) | 15 lines

Integrated the latest doctest rom the Python cvs.

This brought two backward-incompatible changes:

- setUp and tearDown functions are now passed a test 
  argument, which is a doctest.DocTest.  This provides access to the
  test globals.

- The names of doctest reporting options for requesting diff output
  have changed.

Thesechanges are both positive for the long run, despite the
short-term backward-incompatability. Better before X3.0 final than
later.
  • Loading branch information
Jim Fulton committed Aug 28, 2004
1 parent 84138b0 commit cef2a5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions browser/tests/test_addMenuItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
>>> context = Context()
>>> addMenuItem(context, class_=X, title="Add an X",
... permission="zope.ManageContent")
>>> context # doctest: +CONTEXT_DIFF
>>> context
((('utility',
<InterfaceClass zope.component.interfaces.IFactory>,
'zope.app.browser.add.zope.app.publisher.browser.tests.test_addMenuItem.X'),
Expand Down Expand Up @@ -131,7 +131,7 @@ def test_w_factory_class_view():
>>> addMenuItem(context, class_=X, title="Add an X",
... permission="zope.ManageContent", description="blah blah",
... filter="context/foo", view="AddX")
>>> context # doctest: +CONTEXT_DIFF
>>> context
((('utility',
<InterfaceClass zope.component.interfaces.IFactory>,
'zope.app.browser.add.""" \
Expand Down
4 changes: 2 additions & 2 deletions xmlrpc/ftests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def __getattr__(self, name):
name = 'zope.app.publisher.xmlrpc.README'


def setUp():
def setUp(test):
globs['__name__'] = name
sys.modules[name] = FakeModule(globs)

def tearDown():
def tearDown(test):
# clean up the views we registered:

# we use the fact that registering None unregisters whatever is
Expand Down

0 comments on commit cef2a5d

Please sign in to comment.