From 00436cb6579dda584aa085a4c4610c4593da7050 Mon Sep 17 00:00:00 2001 From: Artem Yunusov Date: Sun, 24 Aug 2008 00:00:52 +0500 Subject: Added final results to test script. --- test-markdown.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test-markdown.py') diff --git a/test-markdown.py b/test-markdown.py index 3ccda05..ee79afa 100644 --- a/test-markdown.py +++ b/test-markdown.py @@ -223,6 +223,7 @@ def testDirectory(dir, measure_time=False, safe_mode=False) : diffsBuffer = "" + for test in tests : print "--- %s ---" % test @@ -268,7 +269,8 @@ def testDirectory(dir, measure_time=False, safe_mode=False) : htmlDiffFile.write("OK") else : - + + failedTests.append(test) htmlDiffFile.write("" + "FAILED" % test) @@ -312,6 +314,7 @@ def testDirectory(dir, measure_time=False, safe_mode=False) : benchmark_file = open(benchmark_output_file_name, "w") benchmark_file.write(benchmark_buffer) benchmark_file.close() + def get_benchmark_html (actual, expected) : @@ -353,6 +356,7 @@ print MARKDOWN_FILE markdown = __import__(MARKDOWN_FILE) +failedTests = [] #testDirectory("tests/basic") testDirectory("tests/markdown-test", measure_time=True) @@ -366,3 +370,9 @@ testDirectory("tests/safe_mode", measure_time=True, safe_mode="escape") testDirectory("tests/extensions-x-codehilite") testDirectory("tests/extensions-x-wikilink") +print "\n### Final result ###" +if len(failedTests): + print "%d failed tests: %s" % (len(failedTests), str(failedTests)) +else: + print "All tests passed, no errors!" + -- cgit v1.2.3