"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/ImportHooks.py" between
cheetah3-3.2.6.tar.gz and Cheetah3-3.2.6.post1.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

ImportHooks.py  (cheetah3-3.2.6):ImportHooks.py  (Cheetah3-3.2.6.post1)
skipping to change at line 84 skipping to change at line 84
self.assertIn('layout.py', templates) self.assertIn('layout.py', templates)
def test_import_builtin(self): def test_import_builtin(self):
Cheetah.ImportHooks.install() Cheetah.ImportHooks.install()
for nm in sys.builtin_module_names: for nm in sys.builtin_module_names:
if nm not in sys.modules: if nm not in sys.modules:
__import__(nm) __import__(nm)
return return
raise self.fail("All builtin modules are imported") raise self.fail("All builtin modules are imported")
if not PY2: # _bootlocale was removed in Python 3.10:
# https://bugs.python.org/issue42208
if not PY2 and sys.version_info < (3, 10):
def test_import_bootlocale(self): def test_import_bootlocale(self):
if '_bootlocale' in sys.modules: if '_bootlocale' in sys.modules:
del sys.modules['_bootlocale'] del sys.modules['_bootlocale']
Cheetah.ImportHooks.install() Cheetah.ImportHooks.install()
import _bootlocale # noqa: F401 '_bootlocale' imported but unused import _bootlocale # noqa: F401 '_bootlocale' imported but unused
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)