forked from orbit-oss/flask
Deal with partially setup packages in the redirect hook.
This commit is contained in:
parent
ee9b401632
commit
9691b7f0bf
6 changed files with 49 additions and 7 deletions
|
|
@ -8,6 +8,8 @@
|
|||
:copyright: (c) 2011 by Armin Ronacher.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from __future__ import with_statement
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
from flask.testsuite import FlaskTestCase
|
||||
|
|
@ -92,6 +94,11 @@ class ExtImportHookTestCase(FlaskTestCase):
|
|||
from flask.ext.oldext_package.submodule import test_function
|
||||
self.assert_equal(test_function(), 42)
|
||||
|
||||
def test_flaskext_broken_package_no_module_caching(self):
|
||||
for x in xrange(2):
|
||||
with self.assert_raises(ImportError):
|
||||
import flask.ext.broken
|
||||
|
||||
|
||||
def suite():
|
||||
suite = unittest.TestSuite()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue