From: Felix W. <fel...@us...> - 2005-02-26 23:44:23
|
Update of /cvsroot/docutils/docutils/test/test_parsers/test_rst/test_directives In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6623/test/test_parsers/test_rst/test_directives Modified Files: test_include.py test_raw.py Log Message: skip tests whose output contains "UnicodeDecodeErro" on Python 2.2 or lower, because the exception class was "UnicodeError" before Python 2.3 Index: test_raw.py =================================================================== RCS file: /cvsroot/docutils/docutils/test/test_parsers/test_rst/test_directives/test_raw.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test_raw.py 25 Feb 2005 01:32:01 -0000 1.7 +++ test_raw.py 26 Feb 2005 23:44:13 -0000 1.8 @@ -11,6 +11,7 @@ """ import os.path +import sys from __init__ import DocutilsTestSupport @@ -136,6 +137,17 @@ """], ] +# Skip tests whose output contains "UnicodeDecodeError" if we are not +# using Python 2.3 or higher. +if sys.version_info < (2, 3): + for i in range(len(totest['raw'])): + if totest['raw'][i][1].find('UnicodeDecodeError') != -1: + del totest['raw'][i] + print ("Test totest['raw'][%s] skipped; " + "Python 2.3+ required for expected output." % i) + # Assume we have only one of these tests. + break + if __name__ == '__main__': import unittest Index: test_include.py =================================================================== RCS file: /cvsroot/docutils/docutils/test/test_parsers/test_rst/test_directives/test_include.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- test_include.py 25 Feb 2005 01:32:01 -0000 1.17 +++ test_include.py 26 Feb 2005 23:44:13 -0000 1.18 @@ -11,6 +11,7 @@ """ import os.path +import sys from __init__ import DocutilsTestSupport @@ -338,6 +339,17 @@ # """ % (include10rel, include10rel)], ] +# Skip tests whose output contains "UnicodeDecodeError" if we are not +# using Python 2.3 or higher. +if sys.version_info < (2, 3): + for i in range(len(totest['include'])): + if totest['include'][i][1].find('UnicodeDecodeError') != -1: + del totest['include'][i] + print ("Test totest['include'][%s] skipped; " + "Python 2.3+ required for expected output." % i) + # Assume we have only one of these tests. + break + if __name__ == '__main__': import unittest |