From 236debbb1f9b52b064c6461e48dc787022dcfbe3 Mon Sep 17 00:00:00 2001 From: grubert Date: Tue, 8 Jul 2014 11:00:46 +0000 Subject: [PATCH] FIX the test! styleshhet path with drive letter git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7770 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/test_writers/test_html4css1_template.py | 15 ++++++++++++--- test/test_writers/test_s5.py | 13 ++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/test/test_writers/test_html4css1_template.py b/test/test_writers/test_html4css1_template.py index 5d507506c..8fef347e4 100755 --- a/test/test_writers/test_html4css1_template.py +++ b/test/test_writers/test_html4css1_template.py @@ -9,6 +9,8 @@ Tests for the HTML writer. """ import os +import platform + from __init__ import DocutilsTestSupport @@ -21,6 +23,11 @@ def suite(): s.generateTests(totest) return s +if platform.system() == "Windows": + drive_prefix = "C:" +else: + drive_prefix = "" + totest = {} totest['template'] = [ @@ -56,7 +63,7 @@ head = """\ stylesheet = """\ -""" +""" body_prefix = """\ @@ -113,7 +120,7 @@ head = """\ stylesheet = """\ -""" +""" body_prefix = """\ @@ -228,7 +235,9 @@ html_body = """\ footer text """ -''' % {'version': DocutilsTestSupport.docutils.__version__}] +''' % {'version': DocutilsTestSupport.docutils.__version__, + 'drive': drive_prefix, + }] ] if __name__ == '__main__': diff --git a/test/test_writers/test_s5.py b/test/test_writers/test_s5.py index 9aa3013df..8f66d7f90 100755 --- a/test/test_writers/test_s5.py +++ b/test/test_writers/test_s5.py @@ -9,6 +9,8 @@ Tests for the S5/HTML writer. """ import os +import platform + from __init__ import DocutilsTestSupport @@ -22,7 +24,12 @@ def suite(): s.generateTests(totest_2) return s -interpolations = {'version': DocutilsTestSupport.docutils.__version__} +interpolations = { + 'version': DocutilsTestSupport.docutils.__version__, + 'drive': '', } + +if platform.system() == "Windows": + interpolations['drive'] = "C:" totest_1 = {} totest_2 = {} @@ -49,7 +56,7 @@ Slide text. Show Title - + @@ -114,7 +121,7 @@ We're just checking the settings Bogus Slide Show - + -- 2.11.4.GIT