mirror of
https://github.com/python/cpython.git
synced 2025-09-18 22:50:26 +00:00
Reduced memory burden by iterating over the normalization test input
file directly (instead of sucking it all into a list of lines first).
This commit is contained in:
parent
1b445d3fcf
commit
1babdfc48a
2 changed files with 2 additions and 4 deletions
|
@ -506,7 +506,7 @@ def printlist(x, width=70, indent=4):
|
||||||
# test_normalization
|
# test_normalization
|
||||||
# Whether a skip is expected here depends on whether a large test
|
# Whether a skip is expected here depends on whether a large test
|
||||||
# input file has been downloaded. test_normalization.skip_expected
|
# input file has been downloaded. test_normalization.skip_expected
|
||||||
# controls that
|
# controls that.
|
||||||
|
|
||||||
_expectations = {
|
_expectations = {
|
||||||
'win32':
|
'win32':
|
||||||
|
|
|
@ -33,10 +33,8 @@ def test_main():
|
||||||
raise TestSkipped(TESTDATAFILE + " not found, download from " +
|
raise TestSkipped(TESTDATAFILE + " not found, download from " +
|
||||||
"http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE)
|
"http://www.unicode.org/Public/UNIDATA/" + TESTDATAFILE)
|
||||||
|
|
||||||
data = open(TESTDATAFILE).readlines()
|
|
||||||
|
|
||||||
part1_data = {}
|
part1_data = {}
|
||||||
for line in data:
|
for line in open(TESTDATAFILE):
|
||||||
if '#' in line:
|
if '#' in line:
|
||||||
line = line.split('#')[0]
|
line = line.split('#')[0]
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue