Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Use cleanup function.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Apr 3, 2012
1 parent 96d07cd commit acebf0b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/mongopersist/zope/tests/test_container.py
Expand Up @@ -29,7 +29,7 @@
from zope.container import contained, btree
from zope.testing import module, renormalizing

from mongopersist import datamanager, interfaces, serialize
from mongopersist import datamanager, interfaces, serialize, testing
from mongopersist.zope import container

class ApplicationRoot(container.SimpleMongoContainer):
Expand Down Expand Up @@ -715,19 +715,17 @@ def setUp(test):

# silence this, otherwise half-baked objects raise exceptions
# on trying to __repr__ missing attributes
test.orig_DEBUG_EXCEPTION_FORMATTER = exceptionformatter.DEBUG_EXCEPTION_FORMATTER
test.orig_DEBUG_EXCEPTION_FORMATTER = \
exceptionformatter.DEBUG_EXCEPTION_FORMATTER
exceptionformatter.DEBUG_EXCEPTION_FORMATTER = 0

def tearDown(test):
placelesssetup.tearDown(test)
module.tearDown(test)
test.globs['conn'].disconnect()
serialize.SERIALIZERS.__init__()
serialize.OID_CLASS_LRU.__init__(20000)
serialize.COLLECTIONS_WITH_TYPE.__init__()
serialize.AVAILABLE_NAME_MAPPINGS.__init__()
serialize.PATH_RESOLVE_CACHE.__init__()
exceptionformatter.DEBUG_EXCEPTION_FORMATTER = test.orig_DEBUG_EXCEPTION_FORMATTER
testing.resetCaches()
exceptionformatter.DEBUG_EXCEPTION_FORMATTER = \
test.orig_DEBUG_EXCEPTION_FORMATTER

def test_suite():
return doctest.DocTestSuite(
Expand Down

0 comments on commit acebf0b

Please sign in to comment.