summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile64.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-15 09:57:03 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-15 09:57:03 (GMT)
commit643ad192518389918253c83876d5016b4b577c1a (patch)
tree7356b696e8c9947a43f7870adaf864101e884edb /Lib/test/test_zipfile64.py
parentb526a29dbcdca4cc0db5be1a474c625d1ba95e54 (diff)
downloadcpython-643ad192518389918253c83876d5016b4b577c1a.zip
cpython-643ad192518389918253c83876d5016b4b577c1a.tar.gz
cpython-643ad192518389918253c83876d5016b4b577c1a.tar.bz2
Steal the trick from test_compiler to print out a slow msg.
This will hopefully get the buildbots to pass. Not sure this test will be feasible or even work. But everything is red now, so it can't get much worse.
Diffstat (limited to 'Lib/test/test_zipfile64.py')
-rw-r--r--Lib/test/test_zipfile64.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile64.py b/Lib/test/test_zipfile64.py
index c9807bf..b0d447d 100644
--- a/Lib/test/test_zipfile64.py
+++ b/Lib/test/test_zipfile64.py
@@ -14,6 +14,8 @@ except ImportError:
zlib = None
import zipfile, os, unittest
+import time
+import sys
from StringIO import StringIO
from tempfile import TemporaryFile
@@ -22,6 +24,9 @@ from test.test_support import TESTFN, run_unittest
TESTFN2 = TESTFN + "2"
+# How much time in seconds can pass before we print a 'Still working' message.
+_PRINT_WORKING_MSG_INTERVAL = 5 * 60
+
class TestsWithSourceFile(unittest.TestCase):
def setUp(self):
line_gen = ("Test of zipfile line %d." % i for i in range(0, 1000000))
@@ -37,14 +42,27 @@ class TestsWithSourceFile(unittest.TestCase):
filecount = int(((1 << 32) / len(self.data)) * 1.5)
zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True)
+ next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
for num in range(filecount):
zipfp.writestr("testfn%d"%(num,), self.data)
+ # Print still working message since this test can be really slow
+ if next_time <= time.time():
+ next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
+ print >>sys.__stdout__, \
+ ' zipTest still working, be patient...'
+ sys.__stdout__.flush()
zipfp.close()
# Read the ZIP archive
zipfp = zipfile.ZipFile(f, "r", compression)
for num in range(filecount):
self.assertEqual(zipfp.read("testfn%d"%(num,)), self.data)
+ # Print still working message since this test can be really slow
+ if next_time <= time.time():
+ next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
+ print >>sys.__stdout__, \
+ ' zipTest still working, be patient...'
+ sys.__stdout__.flush()
zipfp.close()
def testStored(self):