diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:27:47 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:27:47 +0000 |
| commit | 7ac5aa82a7e67cd82744976315b93a9d660f9ad3 (patch) | |
| tree | 0284b99022ecf74be7f45c4ae2fb25b6cff3a7ec /repoze/bfg/testing.py | |
| parent | fe399b8d88746fda216a66bf80f6185ddf0fbac2 (diff) | |
| download | pyramid-7ac5aa82a7e67cd82744976315b93a9d660f9ad3.tar.gz pyramid-7ac5aa82a7e67cd82744976315b93a9d660f9ad3.tar.bz2 pyramid-7ac5aa82a7e67cd82744976315b93a9d660f9ad3.zip | |
Deal with registries we may not understand.
Diffstat (limited to 'repoze/bfg/testing.py')
| -rw-r--r-- | repoze/bfg/testing.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 1859cf9b8..9cba616a7 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -531,7 +531,7 @@ def setUp(registry=None, request=None, hook_zca=True): .. note:: The ``setUp`` function is new as of :mod:`repoze.bfg` 1.1. - Use this function in the ``setUp`` method of a unit test test case + Use this function in the ``setUp`` method of a unittest test case which directly or indirectly uses: - any of the ``register*`` functions in ``repoze.bfg.testing`` @@ -621,7 +621,11 @@ def tearDown(unhook_zca=True): if info is not None: reg = info['registry'] if hasattr(reg, '__init__') and hasattr(reg, '__name__'): - reg.__init__(reg.__name__) + try: + reg.__init__(reg.__name__) + except TypeError: + # maybe somebody's using a registry we don't understand + pass _clearContext() # XXX why? def cleanUp(*arg, **kw): |
