diff options
| author | Michael Merickel <michael@merickel.org> | 2017-04-02 12:48:22 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2017-04-02 12:48:22 -0500 |
| commit | a857ebbc65c0491f27d39c7a6c1ba485c99fee5d (patch) | |
| tree | bdfebcc4818c7ca311683b82d29199bd1e62eeb7 | |
| parent | 126c63581d72e2818c8e37edbc47b49682f575e1 (diff) | |
| download | pyramid-a857ebbc65c0491f27d39c7a6c1ba485c99fee5d.tar.gz pyramid-a857ebbc65c0491f27d39c7a6c1ba485c99fee5d.tar.bz2 pyramid-a857ebbc65c0491f27d39c7a6c1ba485c99fee5d.zip | |
add a failing test checking whether the threadlocal registry is active during config.include
| -rw-r--r-- | pyramid/tests/test_config/test_init.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pyramid/tests/test_config/test_init.py b/pyramid/tests/test_config/test_init.py index 0d5413d16..53c601537 100644 --- a/pyramid/tests/test_config/test_init.py +++ b/pyramid/tests/test_config/test_init.py @@ -817,6 +817,16 @@ pyramid.tests.test_config.dummy_include2""", self.assertEqual(results['root_package'], tests) self.assertEqual(results['package'], test_config) + def test_include_threadlocals_active(self): + from pyramid.tests import test_config + from pyramid.threadlocal import get_current_registry + stack = [] + def include(config): + stack.append(get_current_registry()) + config = self._makeOne() + config.include(include) + self.assertTrue(stack[0] is config.registry) + def test_action_branching_kw_is_None(self): config = self._makeOne(autocommit=True) self.assertEqual(config.action('discrim'), None) |
