From b541caecff9ecd14545ca16f9fe278c29fbaf4a3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 4 Dec 2009 16:21:01 +0000 Subject: - 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. --- repoze/bfg/tests/test_compat.py | 5 ++--- repoze/bfg/tests/test_configuration.py | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'repoze/bfg/tests') 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 -- cgit v1.2.3