Skip to content

Commit

Permalink
Introducing better isolation between tests prevents test crashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
faassen committed Apr 23, 2010
1 parent e143d14 commit 8dc93e3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/grok/ftests/catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
... print obj.name
Ellie
Nuke the catalog and intids in the end, so as not to confuse
other tests::
>>> from zope import component
>>> sm = herd.getSiteManager()
>>> sm.unregisterUtility(catalog, provided=ICatalog)
True
>>> intids = component.getUtility(IIntIds)
>>> sm.unregisterUtility(intids, provided=IIntIds)
True
"""

import grok
Expand Down
11 changes: 11 additions & 0 deletions src/grok/ftests/catalog/setuporder.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
... print obj.name
Ellie
Nuke the catalog and intids in the end, so as not to confuse
other tests::
>>> from zope import component
>>> sm = herd.getSiteManager()
>>> sm.unregisterUtility(catalog, provided=ICatalog)
True
>>> intids = component.getUtility(IIntIds)
>>> sm.unregisterUtility(intids, provided=IIntIds)
True
"""

import grok
Expand Down

0 comments on commit 8dc93e3

Please sign in to comment.