forked from orbit-oss/flask
py3 compat: use six.reload_module
This commit is contained in:
parent
522cd00093
commit
287905e67c
1 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ from __future__ import with_statement
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
from flask.testsuite import FlaskTestCase
|
from flask.testsuite import FlaskTestCase
|
||||||
|
from six import reload_module
|
||||||
|
|
||||||
class ExtImportHookTestCase(FlaskTestCase):
|
class ExtImportHookTestCase(FlaskTestCase):
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ class ExtImportHookTestCase(FlaskTestCase):
|
||||||
entry == 'flaskext') and value is not None:
|
entry == 'flaskext') and value is not None:
|
||||||
sys.modules.pop(entry, None)
|
sys.modules.pop(entry, None)
|
||||||
from flask import ext
|
from flask import ext
|
||||||
reload(ext)
|
reload_module(ext)
|
||||||
|
|
||||||
# reloading must not add more hooks
|
# reloading must not add more hooks
|
||||||
import_hooks = 0
|
import_hooks = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue