aboutsummaryrefslogtreecommitdiffstats
path: root/test-markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-03-19 03:47:16 +0000
committerWaylan Limberg <waylan@gmail.com>2008-03-19 03:47:16 +0000
commita190c3941a7bed4274fe08e92ba4ce368c1c837f (patch)
treee936f95bde7b0b06d0422f16afd125bb290cb130 /test-markdown.py
parent2db5d1c8e469d2943a6a851bc0ff3ede070e448b (diff)
downloadmarkdown-a190c3941a7bed4274fe08e92ba4ce368c1c837f.tar.gz
markdown-a190c3941a7bed4274fe08e92ba4ce368c1c837f.tar.bz2
markdown-a190c3941a7bed4274fe08e92ba4ce368c1c837f.zip
Added safe_mode to testing framework and soem tests.
Diffstat (limited to 'test-markdown.py')
-rw-r--r--test-markdown.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-markdown.py b/test-markdown.py
index 48dd40b..06696fa 100644
--- a/test-markdown.py
+++ b/test-markdown.py
@@ -5,7 +5,7 @@ import textwrap
markdown = None
TEST_DIR = "tests"
-TMP_DIR = "/tmp/"
+TMP_DIR = "./tmp/"
WRITE_BENCHMARK = True
WRITE_BENCHMARK = False
ACTUALLY_MEASURE_MEMORY = True
@@ -162,7 +162,7 @@ def smart_split(text) :
-def testDirectory(dir, measure_time = False) :
+def testDirectory(dir, measure_time=False, safe_mode=False) :
encoding = "utf8"
@@ -197,7 +197,7 @@ def testDirectory(dir, measure_time = False) :
mem = memory()
t = time.clock()
- md = markdown.Markdown(extensions=extensions)
+ md = markdown.Markdown(extensions=extensions, safe_mode = safe_mode)
construction_time = time.clock() - t
construction_mem = memory(mem)
@@ -353,4 +353,4 @@ testDirectory("tests/markdown-test", measure_time=True)
testDirectory("tests/misc", measure_time=True)
#testDirectory("tests/extensions-x-footnotes")
# testDirectory("tests/extensions-x-ext1-ext2")
-
+testDirectory("tests/safe_mode", measure_time=True, safe_mode="escape")