"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/NameMapper_pure.py" between
cheetah3-3.2.2.tar.gz and cheetah3-3.2.3.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).

NameMapper_pure.py  (cheetah3-3.2.2):NameMapper_pure.py  (cheetah3-3.2.3)
#!/usr/bin/env python
import sys import sys
import unittest import unittest
try: try:
from Cheetah import _namemapper # noqa from Cheetah import _namemapper # noqa
except ImportError: except ImportError:
# _namemapper hasn't been compiled so Tests/NameMapper.py # _namemapper hasn't been compiled so Tests/NameMapper.py
# tests pure-python NameMapper.py; no need to duplicate these tests. # tests pure-python NameMapper.py; no need to duplicate these tests.
pass pass
skipping to change at line 40 skipping to change at line 38
def tearDownModule(): def tearDownModule():
del sys.modules['Cheetah.NameMapper'] del sys.modules['Cheetah.NameMapper']
del sys.modules['Cheetah._namemapper'] del sys.modules['Cheetah._namemapper']
del sys.modules['Cheetah.Tests.NameMapper'] del sys.modules['Cheetah.Tests.NameMapper']
_setNameMapperFunctions() # restore NameMapper _setNameMapperFunctions() # restore NameMapper
class NameMapperTest(unittest.TestCase): class NameMapperTest(unittest.TestCase):
def test_valueForName(self): def test_valueForName(self):
from Cheetah.NameMapper import valueForName from Cheetah.NameMapper import valueForName
self.assertEqual(valueForName('upper', 'upper', True), 'UPPER') self.assertEqual(valueForName('upper', 'upper', True), 'UPPER')
if __name__ == '__main__':
unittest.main()
 End of changes. 2 change blocks. 
2 lines changed or deleted 0 lines changed or added

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