[Python-checkins] python/dist/src/Lib/test test_tempfile.py,1.5,1.6
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 16 Aug 2002 12:29:01 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv31027/Lib/test
Modified Files:
test_tempfile.py
Log Message:
Drop the number of test files to 100 for all the tests
Index: test_tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tempfile.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_tempfile.py 14 Aug 2002 14:52:02 -0000 1.5
--- test_tempfile.py 16 Aug 2002 19:28:59 -0000 1.6
***************
*** 19,22 ****
--- 19,26 ----
has_textmode = (tempfile._text_openflags != tempfile._bin_openflags)
+ # TEST_FILES may need to be tweaked for systems depending on the maximum
+ # number of files that can be opened at one time (see ulimit -n)
+ TEST_FILES = 100
+
# This is organized as one test for each chunk of code in tempfile.py,
# in order of their appearance in the file. Testing which requires
***************
*** 157,161 ****
dict = {}
r = self.r
! for i in xrange(100):
s = r.next()
self.nameCheck(s, '', '', '')
--- 161,165 ----
dict = {}
r = self.r
! for i in xrange(TEST_FILES):
s = r.next()
self.nameCheck(s, '', '', '')
***************
*** 291,295 ****
def test_basic_many(self):
"""_mkstemp_inner can create many files (stochastic)"""
! extant = range(1000)
for i in extant:
extant[i] = self.do_create(pre="aa")
--- 295,299 ----
def test_basic_many(self):
"""_mkstemp_inner can create many files (stochastic)"""
! extant = range(TEST_FILES)
for i in extant:
extant[i] = self.do_create(pre="aa")
***************
*** 495,499 ****
def test_basic_many(self):
"""mkdtemp can create many directories (stochastic)"""
! extant = range(1000)
try:
for i in extant:
--- 499,503 ----
def test_basic_many(self):
"""mkdtemp can create many directories (stochastic)"""
! extant = range(TEST_FILES)
try:
for i in extant:
***************
*** 583,587 ****
def test_many(self):
"""mktemp can choose many usable file names (stochastic)"""
! extant = range(1000)
for i in extant:
extant[i] = self.do_create(pre="aa")
--- 587,591 ----
def test_many(self):
"""mktemp can choose many usable file names (stochastic)"""
! extant = range(TEST_FILES)
for i in extant:
extant[i] = self.do_create(pre="aa")