diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 21:15:32 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 21:15:32 (GMT) |
commit | bb417dcc49def0582d50d94eddcd6172214e61d5 (patch) | |
tree | 7c8aec3bb31913e5b4c325f4c12dd9528825bd7f /Lib/test/test_normalization.py | |
parent | 6dfcb0228773dd4ee8dd356cac5aba065388b9ea (diff) | |
download | cpython-bb417dcc49def0582d50d94eddcd6172214e61d5.zip cpython-bb417dcc49def0582d50d94eddcd6172214e61d5.tar.gz cpython-bb417dcc49def0582d50d94eddcd6172214e61d5.tar.bz2 |
Merged revisions 66369 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66369 | martin.v.loewis | 2008-09-10 21:16:35 +0200 (Mi, 10 Sep 2008) | 4 lines
Read unidata_version from unicodedata module.
Delete old NormalizationTest.txt if it doesn't match
unidata_version.
........
Diffstat (limited to 'Lib/test/test_normalization.py')
-rw-r--r-- | Lib/test/test_normalization.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py index 96b1ba1..5884334 100644 --- a/Lib/test/test_normalization.py +++ b/Lib/test/test_normalization.py @@ -3,10 +3,17 @@ import unittest import sys import os -from unicodedata import normalize +from unicodedata import normalize, unidata_version TESTDATAFILE = "NormalizationTest.txt" -TESTDATAURL = "http://www.unicode.org/Public/5.1.0/ucd/" + TESTDATAFILE +TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE + +if os.path.exists(TESTDATAFILE): + f = open(TESTDATAFILE) + l = f.readline() + f.close() + if not unidata_version in l: + os.unlink(TESTDATAFILE) class RangeError(Exception): pass |