diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-12-04 16:21:01 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-12-04 16:21:01 +0000 |
| commit | b541caecff9ecd14545ca16f9fe278c29fbaf4a3 (patch) | |
| tree | ba28ecbfbb38e104889fc91093b911806b1c1c71 /repoze/bfg/tests | |
| parent | ab4e7b9befb1b84deedfcb29766e8250113ba566 (diff) | |
| download | pyramid-b541caecff9ecd14545ca16f9fe278c29fbaf4a3.tar.gz pyramid-b541caecff9ecd14545ca16f9fe278c29fbaf4a3.tar.bz2 pyramid-b541caecff9ecd14545ca16f9fe278c29fbaf4a3.zip | |
- Operation on GAE was broken, presumably because the
``repoze.bfg.configuration`` module began to attempt to import the
``repoze.bfg.chameleon_zpt`` and ``repoze.bfg.chameleon_text``
modules, and these cannot be used on non-CPython platforms. It now
tolerates startup time import failures for these modules, and only
raise an import error when a template from one of these packages is
actually used.
Diffstat (limited to 'repoze/bfg/tests')
| -rw-r--r-- | repoze/bfg/tests/test_compat.py | 5 | ||||
| -rw-r--r-- | repoze/bfg/tests/test_configuration.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/repoze/bfg/tests/test_compat.py b/repoze/bfg/tests/test_compat.py index cbee29654..66ea61860 100644 --- a/repoze/bfg/tests/test_compat.py +++ b/repoze/bfg/tests/test_compat.py @@ -1,10 +1,9 @@ import unittest -class TestAll(unittest.TestCase): - def test_it(self): +class TestAliases(unittest.TestCase): + def test_all(self): from repoze.bfg.compat import all self.assertEqual(all([True, True]), True) self.assertEqual(all([False, False]), False) self.assertEqual(all([False, True]), False) - diff --git a/repoze/bfg/tests/test_configuration.py b/repoze/bfg/tests/test_configuration.py index da2f1d2c4..4523fe463 100644 --- a/repoze/bfg/tests/test_configuration.py +++ b/repoze/bfg/tests/test_configuration.py @@ -84,6 +84,9 @@ class ConfiguratorTests(unittest.TestCase): self.failUnless(config.registry.getUtility(ISettings)) self.assertEqual(config.package, this_pkg) self.failUnless(config.registry.getUtility(IRendererFactory, 'json')) + self.failUnless(config.registry.getUtility(IRendererFactory, 'string')) + self.failUnless(config.registry.getUtility(IRendererFactory, '.pt')) + self.failUnless(config.registry.getUtility(IRendererFactory, '.txt')) def test_ctor_with_package_registry(self): import sys |
