From cd73ef768613ae2b3683f8e926f405562bc37e39 Mon Sep 17 00:00:00 2001 From: Yuri Takhteyev Date: Thu, 4 Dec 2008 14:43:47 -0800 Subject: Different way of importing htmlentitydefs for python 3.0 and disabling diff output in test-markdown.py for the same. --- test-markdown.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test-markdown.py') diff --git a/test-markdown.py b/test-markdown.py index 3d9ef66..d2548a0 100755 --- a/test-markdown.py +++ b/test-markdown.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import os, difflib, time, gc, codecs, platform +import os, difflib, time, gc, codecs, platform, sys from pprint import pprint import textwrap @@ -306,7 +306,9 @@ def testDirectory(dir, measure_time=False, safe_mode=False) : htmlDiffFile.write("") - htmlDiffFile.write(diffsBuffer.decode("utf8")) + if sys.version < "3.0": + htmlDiffFile.write(diffsBuffer.decode("utf8")) + htmlDiffFile.write(FOOTER) htmlDiffFile.close() print "Diff written to %s" % htmlDiffFilePath -- cgit v1.2.3