diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-11-24 19:19:09 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-11-24 19:19:09 (GMT) |
commit | 1babdfc48afc60afe5ae708f77dad8a641bf36ec (patch) | |
tree | 23802ae018a30053f627286c76be4aa31c2a627b | |
parent | 1b445d3fcfcc06e5360e83b978efdb9b1c980278 (diff) | |
download | cpython-1babdfc48afc60afe5ae708f77dad8a641bf36ec.zip cpython-1babdfc48afc60afe5ae708f77dad8a641bf36ec.tar.gz cpython-1babdfc48afc60afe5ae708f77dad8a641bf36ec.tar.bz2 |
Reduced memory burden by iterating over the normalization test input
file directly (instead of sucking it all into a list of lines first).
-rwxr-xr-x | Lib/test/regrtest.py | 2 | ||||
-rw-r--r-- | Lib/test/test_normalization.py | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index d0650e6..f870527 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -506,7 +506,7 @@ def printlist(x, width=70, indent=4): # test_normalization # Whether a skip is expected here depends on whether a large test # input file has been downloaded. test_normalization.skip_expected -# controls that +# controls that. _expectations = { 'win32': diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py index b673739..7e18c97 100644 --- a/Lib/test/test_normalization.py +++ b/Lib/test/test_normalization.py @@ -33,10 +33,8 @@ def test_main(): raise TestSkipped(TESTDATAFILE + " not found, download from " + "http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE) - data = open(TESTDATAFILE).readlines() - part1_data = {} - for line in data: + for line in open(TESTDATAFILE): if '#' in line: line = line.split('#')[0] line = line.strip() |