"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Zope2/utilities/tests/test_zconsole.py" between
Zope-5.1.1.tar.gz and Zope-5.1.2.tar.gz

About: Zope Z Object Publishing Environment - web application platform used for building content management systems, intranets, portals, and custom applications.

test_zconsole.py  (Zope-5.1.1):test_zconsole.py  (Zope-5.1.2)
skipping to change at line 12 skipping to change at line 12
import shutil import shutil
import sys import sys
import tempfile import tempfile
import unittest import unittest
from io import StringIO from io import StringIO
from App.config import getConfiguration from App.config import getConfiguration
from App.config import setConfiguration from App.config import setConfiguration
zope_conf_template = """ zope_conf_template = """
%define INSTANCE {} %define INSTANCE {0}
instancehome $INSTANCE instancehome $INSTANCE
<zodb_db main> <zodb_db main>
<filestorage> <filestorage>
path $INSTANCE/Data.fs path $INSTANCE/Data.fs
</filestorage> </filestorage>
mount-point / mount-point /
</zodb_db> </zodb_db>
""" """
skipping to change at line 91 skipping to change at line 91
runscript(self.zopeconf, script, 'bar', 'baz') runscript(self.zopeconf, script, 'bar', 'baz')
sys.stdout.seek(0) sys.stdout.seek(0)
got = sys.stdout.read() got = sys.stdout.read()
finally: finally:
sys.argv = self.stored_sys_argv sys.argv = self.stored_sys_argv
sys.stdout = self.stored_stdout sys.stdout = self.stored_stdout
# We get double escape for backslash \ on windows from test script, # We get double escape for backslash \ on windows from test script,
# so we have the raw string in there. # so we have the raw string in there.
expected = ( expected = (
"42\n" "42\n"
r"['run', {!r}, {!r}, {!r}, 'baz']" rf"['run', {self.zopeconf!r}, {script!r}, {bar!r}, 'baz']"
"\nPropertyManager\n".format(self.zopeconf, script, bar)) "\nPropertyManager\n")
self.assertEqual(expected, got) self.assertEqual(expected, got)
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

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