"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/TemplateCmdLineIface.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).

TemplateCmdLineIface.py  (cheetah3-3.2.2):TemplateCmdLineIface.py  (cheetah3-3.2.3)
#!/usr/bin/env python
try: try:
from io import BytesIO, TextIOWrapper from io import BytesIO, TextIOWrapper
except ImportError: except ImportError:
try: try:
from cStringIO import StringIO as BytesIO from cStringIO import StringIO as BytesIO
except ImportError: except ImportError:
from StringIO import StringIO as BytesIO from StringIO import StringIO as BytesIO
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
skipping to change at line 86 skipping to change at line 84
def tearDown(self): def tearDown(self):
os.remove(self.pickle_file.name) os.remove(self.pickle_file.name)
def test_pickle_file(self): def test_pickle_file(self):
klass = Template.compile(source='$foo') klass = Template.compile(source='$foo')
t = klass() t = klass()
cmdline = CmdLineIface(t, scriptName='test', cmdline = CmdLineIface(t, scriptName='test',
cmdLineArgs=['--pickle', self.pickle_file.name]) cmdLineArgs=['--pickle', self.pickle_file.name])
cmdline._processCmdLineArgs() cmdline._processCmdLineArgs()
assert str(t) == 'test foo' assert str(t) == 'test foo'
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)