martin.v.loewis
2008-09-10 21:15:33 UTC
Author: martin.v.loewis
Date: Wed Sep 10 23:15:32 2008
New Revision: 66371
Log:
Merged revisions 66369 via svnmerge from
svn+ssh://pythondev at 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.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_normalization.py
Modified: python/branches/py3k/Lib/test/test_normalization.py
==============================================================================
--- python/branches/py3k/Lib/test/test_normalization.py (original)
+++ python/branches/py3k/Lib/test/test_normalization.py Wed Sep 10 23:15:32 2008
@@ -3,10 +3,17 @@
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
Date: Wed Sep 10 23:15:32 2008
New Revision: 66371
Log:
Merged revisions 66369 via svnmerge from
svn+ssh://pythondev at 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.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_normalization.py
Modified: python/branches/py3k/Lib/test/test_normalization.py
==============================================================================
--- python/branches/py3k/Lib/test/test_normalization.py (original)
+++ python/branches/py3k/Lib/test/test_normalization.py Wed Sep 10 23:15:32 2008
@@ -3,10 +3,17 @@
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