aboutsummaryrefslogtreecommitdiffstats
path: root/test-markdown.py
diff options
context:
space:
mode:
authorYuri Takhteyev <yuri@freewisdom.org>2008-12-04 14:43:47 -0800
committerYuri Takhteyev <yuri@freewisdom.org>2008-12-04 14:43:47 -0800
commitcd73ef768613ae2b3683f8e926f405562bc37e39 (patch)
tree26d6e541aa8b38e6c66787de134217e15fa35e33 /test-markdown.py
parent6a1309229ecfd11b73ed4771d348e845e419efe6 (diff)
downloadmarkdown-cd73ef768613ae2b3683f8e926f405562bc37e39.tar.gz
markdown-cd73ef768613ae2b3683f8e926f405562bc37e39.tar.bz2
markdown-cd73ef768613ae2b3683f8e926f405562bc37e39.zip
Different way of importing htmlentitydefs for python 3.0 and disabling diff output in test-markdown.py for
the same.
Diffstat (limited to 'test-markdown.py')
-rwxr-xr-xtest-markdown.py6
1 files changed, 4 insertions, 2 deletions
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("</table>")
- 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