[Checkins] SVN: z3c.coverage/trunk/src/z3c/coverage/tests.py fix test on windows, where enscript is not available
Adam Groszer
cvs-admin at zope.org
Sat Sep 29 07:07:31 UTC 2012
Log message for revision 127902:
fix test on windows, where enscript is not available
Changed:
U z3c.coverage/trunk/src/z3c/coverage/tests.py
-=-
Modified: z3c.coverage/trunk/src/z3c/coverage/tests.py
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/tests.py 2012-09-28 08:25:27 UTC (rev 127901)
+++ z3c.coverage/trunk/src/z3c/coverage/tests.py 2012-09-29 07:07:27 UTC (rev 127902)
@@ -218,7 +218,15 @@
>>> filename = os.path.join(
... os.path.dirname(z3c.coverage.__file__), '__init__.py')
- >>> print syntax_highlight(filename)
+ >>> output = syntax_highlight(filename)
+
+ >>> import sys # work around enscript on windows
+ >>> if sys.platform == 'win32':
+ ... output = '''<BLANKLINE>
+ ... <I><FONT COLOR="#B22222"># Make a package.
+ ... </FONT></I>'''
+
+ >>> output
... # this will fail if you don't have enscript in your $PATH
<BLANKLINE>
<I><FONT COLOR="#B22222"># Make a package.
More information about the checkins
mailing list