blob: dc4a7d8ebe6722ca96ec680d429382a8268152cf [file] [log] [blame]
Guido van Rossum7d9ea502003-02-03 20:45:52 +00001import unittest
2from test import test_support
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +00003import zlib
Andrew M. Kuchling9a0f98e2001-02-21 02:17:01 +00004import random
Andrew M. Kuchling9a0f98e2001-02-21 02:17:01 +00005
Andrew M. Kuchling9a0f98e2001-02-21 02:17:01 +00006
Guido van Rossum7d9ea502003-02-03 20:45:52 +00007class ChecksumTestCase(unittest.TestCase):
8 # checksum test cases
9 def test_crc32start(self):
10 self.assertEqual(zlib.crc32(""), zlib.crc32("", 0))
Andrew M. Kuchlingbb7e8002005-11-22 15:32:28 +000011 self.assert_(zlib.crc32("abc", 0xffffffff))
Andrew M. Kuchlingfcfc8d52001-08-10 15:50:11 +000012
Guido van Rossum7d9ea502003-02-03 20:45:52 +000013 def test_crc32empty(self):
14 self.assertEqual(zlib.crc32("", 0), 0)
15 self.assertEqual(zlib.crc32("", 1), 1)
16 self.assertEqual(zlib.crc32("", 432), 432)
Andrew M. Kuchling9a0f98e2001-02-21 02:17:01 +000017
Guido van Rossum7d9ea502003-02-03 20:45:52 +000018 def test_adler32start(self):
19 self.assertEqual(zlib.adler32(""), zlib.adler32("", 1))
Andrew M. Kuchlingbb7e8002005-11-22 15:32:28 +000020 self.assert_(zlib.adler32("abc", 0xffffffff))
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +000021
Guido van Rossum7d9ea502003-02-03 20:45:52 +000022 def test_adler32empty(self):
23 self.assertEqual(zlib.adler32("", 0), 0)
24 self.assertEqual(zlib.adler32("", 1), 1)
25 self.assertEqual(zlib.adler32("", 432), 432)
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +000026
Guido van Rossum7d9ea502003-02-03 20:45:52 +000027 def assertEqual32(self, seen, expected):
28 # 32-bit values masked -- checksums on 32- vs 64- bit machines
29 # This is important if bit 31 (0x08000000L) is set.
Guido van Rossume2a383d2007-01-15 16:59:06 +000030 self.assertEqual(seen & 0x0FFFFFFFF, expected & 0x0FFFFFFFF)
Guido van Rossum7d9ea502003-02-03 20:45:52 +000031
32 def test_penguins(self):
Guido van Rossume2a383d2007-01-15 16:59:06 +000033 self.assertEqual32(zlib.crc32("penguin", 0), 0x0e5c1a120)
Guido van Rossum7d9ea502003-02-03 20:45:52 +000034 self.assertEqual32(zlib.crc32("penguin", 1), 0x43b6aa94)
35 self.assertEqual32(zlib.adler32("penguin", 0), 0x0bcf02f6)
36 self.assertEqual32(zlib.adler32("penguin", 1), 0x0bd602f7)
37
38 self.assertEqual(zlib.crc32("penguin"), zlib.crc32("penguin", 0))
39 self.assertEqual(zlib.adler32("penguin"),zlib.adler32("penguin",1))
40
41
42
43class ExceptionTestCase(unittest.TestCase):
44 # make sure we generate some expected errors
45 def test_bigbits(self):
46 # specifying total bits too large causes an error
47 self.assertRaises(zlib.error,
48 zlib.compress, 'ERROR', zlib.MAX_WBITS + 1)
49
50 def test_badcompressobj(self):
51 # verify failure on building compress object with bad params
Neil Schemenauer94afd3e2004-06-05 19:02:52 +000052 self.assertRaises(ValueError, zlib.compressobj, 1, zlib.DEFLATED, 0)
Guido van Rossum7d9ea502003-02-03 20:45:52 +000053
54 def test_baddecompressobj(self):
55 # verify failure on building decompress object with bad params
56 self.assertRaises(ValueError, zlib.decompressobj, 0)
57
58
59
60class CompressTestCase(unittest.TestCase):
61 # Test compression in one go (whole message compression)
62 def test_speech(self):
Neil Schemenauer6412b122004-06-05 19:34:28 +000063 x = zlib.compress(HAMLET_SCENE)
64 self.assertEqual(zlib.decompress(x), HAMLET_SCENE)
Guido van Rossum7d9ea502003-02-03 20:45:52 +000065
66 def test_speech128(self):
Neil Schemenauer6412b122004-06-05 19:34:28 +000067 # compress more data
68 data = HAMLET_SCENE * 128
Guido van Rossum7d9ea502003-02-03 20:45:52 +000069 x = zlib.compress(data)
70 self.assertEqual(zlib.decompress(x), data)
71
Guido van Rossum7d9ea502003-02-03 20:45:52 +000072
73
74
75class CompressObjectTestCase(unittest.TestCase):
76 # Test compression object
Guido van Rossum7d9ea502003-02-03 20:45:52 +000077 def test_pair(self):
Neil Schemenauer6412b122004-06-05 19:34:28 +000078 # straightforward compress/decompress objects
79 data = HAMLET_SCENE * 128
80 co = zlib.compressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +000081 x1 = co.compress(data)
82 x2 = co.flush()
83 self.assertRaises(zlib.error, co.flush) # second flush should not work
Neil Schemenauer94afd3e2004-06-05 19:02:52 +000084 dco = zlib.decompressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +000085 y1 = dco.decompress(x1 + x2)
86 y2 = dco.flush()
87 self.assertEqual(data, y1 + y2)
88
Neil Schemenauer94afd3e2004-06-05 19:02:52 +000089 def test_compressoptions(self):
90 # specify lots of options to compressobj()
91 level = 2
92 method = zlib.DEFLATED
93 wbits = -12
94 memlevel = 9
95 strategy = zlib.Z_FILTERED
96 co = zlib.compressobj(level, method, wbits, memlevel, strategy)
Neil Schemenauer6412b122004-06-05 19:34:28 +000097 x1 = co.compress(HAMLET_SCENE)
Neil Schemenauer94afd3e2004-06-05 19:02:52 +000098 x2 = co.flush()
99 dco = zlib.decompressobj(wbits)
100 y1 = dco.decompress(x1 + x2)
101 y2 = dco.flush()
Neil Schemenauer6412b122004-06-05 19:34:28 +0000102 self.assertEqual(HAMLET_SCENE, y1 + y2)
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000103
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000104 def test_compressincremental(self):
105 # compress object in steps, decompress object as one-shot
Neil Schemenauer6412b122004-06-05 19:34:28 +0000106 data = HAMLET_SCENE * 128
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000107 co = zlib.compressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000108 bufs = []
109 for i in range(0, len(data), 256):
110 bufs.append(co.compress(data[i:i+256]))
111 bufs.append(co.flush())
112 combuf = ''.join(bufs)
113
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000114 dco = zlib.decompressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000115 y1 = dco.decompress(''.join(bufs))
116 y2 = dco.flush()
117 self.assertEqual(data, y1 + y2)
118
Neil Schemenauer6412b122004-06-05 19:34:28 +0000119 def test_decompinc(self, flush=False, source=None, cx=256, dcx=64):
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000120 # compress object in steps, decompress object in steps
Neil Schemenauer6412b122004-06-05 19:34:28 +0000121 source = source or HAMLET_SCENE
122 data = source * 128
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000123 co = zlib.compressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000124 bufs = []
Neil Schemenauer6412b122004-06-05 19:34:28 +0000125 for i in range(0, len(data), cx):
126 bufs.append(co.compress(data[i:i+cx]))
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000127 bufs.append(co.flush())
128 combuf = ''.join(bufs)
129
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000130 self.assertEqual(data, zlib.decompress(combuf))
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000131
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000132 dco = zlib.decompressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000133 bufs = []
Neil Schemenauer6412b122004-06-05 19:34:28 +0000134 for i in range(0, len(combuf), dcx):
135 bufs.append(dco.decompress(combuf[i:i+dcx]))
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000136 self.assertEqual('', dco.unconsumed_tail, ########
137 "(A) uct should be '': not %d long" %
Neil Schemenauer6412b122004-06-05 19:34:28 +0000138 len(dco.unconsumed_tail))
139 if flush:
140 bufs.append(dco.flush())
141 else:
142 while True:
143 chunk = dco.decompress('')
144 if chunk:
145 bufs.append(chunk)
146 else:
147 break
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000148 self.assertEqual('', dco.unconsumed_tail, ########
Neil Schemenauer6412b122004-06-05 19:34:28 +0000149 "(B) uct should be '': not %d long" %
150 len(dco.unconsumed_tail))
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000151 self.assertEqual(data, ''.join(bufs))
152 # Failure means: "decompressobj with init options failed"
153
Neil Schemenauer6412b122004-06-05 19:34:28 +0000154 def test_decompincflush(self):
155 self.test_decompinc(flush=True)
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000156
Neil Schemenauer6412b122004-06-05 19:34:28 +0000157 def test_decompimax(self, source=None, cx=256, dcx=64):
158 # compress in steps, decompress in length-restricted steps
159 source = source or HAMLET_SCENE
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000160 # Check a decompression object with max_length specified
Neil Schemenauer6412b122004-06-05 19:34:28 +0000161 data = source * 128
162 co = zlib.compressobj()
163 bufs = []
164 for i in range(0, len(data), cx):
165 bufs.append(co.compress(data[i:i+cx]))
166 bufs.append(co.flush())
167 combuf = ''.join(bufs)
168 self.assertEqual(data, zlib.decompress(combuf),
169 'compressed data failure')
170
171 dco = zlib.decompressobj()
172 bufs = []
173 cb = combuf
174 while cb:
175 #max_length = 1 + len(cb)//10
176 chunk = dco.decompress(cb, dcx)
177 self.failIf(len(chunk) > dcx,
178 'chunk too big (%d>%d)' % (len(chunk), dcx))
179 bufs.append(chunk)
180 cb = dco.unconsumed_tail
181 bufs.append(dco.flush())
182 self.assertEqual(data, ''.join(bufs), 'Wrong data retrieved')
183
184 def test_decompressmaxlen(self, flush=False):
185 # Check a decompression object with max_length specified
186 data = HAMLET_SCENE * 128
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000187 co = zlib.compressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000188 bufs = []
189 for i in range(0, len(data), 256):
190 bufs.append(co.compress(data[i:i+256]))
191 bufs.append(co.flush())
192 combuf = ''.join(bufs)
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000193 self.assertEqual(data, zlib.decompress(combuf),
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000194 'compressed data failure')
195
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000196 dco = zlib.decompressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000197 bufs = []
198 cb = combuf
199 while cb:
Guido van Rossumf3594102003-02-27 18:39:18 +0000200 max_length = 1 + len(cb)//10
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000201 chunk = dco.decompress(cb, max_length)
202 self.failIf(len(chunk) > max_length,
203 'chunk too big (%d>%d)' % (len(chunk),max_length))
204 bufs.append(chunk)
205 cb = dco.unconsumed_tail
Neil Schemenauer6412b122004-06-05 19:34:28 +0000206 if flush:
207 bufs.append(dco.flush())
208 else:
209 while chunk:
210 chunk = dco.decompress('', max_length)
211 self.failIf(len(chunk) > max_length,
212 'chunk too big (%d>%d)' % (len(chunk),max_length))
213 bufs.append(chunk)
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000214 self.assertEqual(data, ''.join(bufs), 'Wrong data retrieved')
215
Neil Schemenauer6412b122004-06-05 19:34:28 +0000216 def test_decompressmaxlenflush(self):
217 self.test_decompressmaxlen(flush=True)
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000218
219 def test_maxlenmisc(self):
220 # Misc tests of max_length
Neil Schemenauer94afd3e2004-06-05 19:02:52 +0000221 dco = zlib.decompressobj()
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000222 self.assertRaises(ValueError, dco.decompress, "", -1)
223 self.assertEqual('', dco.unconsumed_tail)
224
225 def test_flushes(self):
226 # Test flush() with the various options, using all the
227 # different levels in order to provide more variations.
228 sync_opt = ['Z_NO_FLUSH', 'Z_SYNC_FLUSH', 'Z_FULL_FLUSH']
229 sync_opt = [getattr(zlib, opt) for opt in sync_opt
230 if hasattr(zlib, opt)]
Neil Schemenauer6412b122004-06-05 19:34:28 +0000231 data = HAMLET_SCENE * 8
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000232
233 for sync in sync_opt:
234 for level in range(10):
235 obj = zlib.compressobj( level )
236 a = obj.compress( data[:3000] )
237 b = obj.flush( sync )
238 c = obj.compress( data[3000:] )
239 d = obj.flush()
240 self.assertEqual(zlib.decompress(''.join([a,b,c,d])),
241 data, ("Decompress failed: flush "
242 "mode=%i, level=%i") % (sync, level))
243 del obj
244
245 def test_odd_flush(self):
246 # Test for odd flushing bugs noted in 2.0, and hopefully fixed in 2.1
247 import random
248
249 if hasattr(zlib, 'Z_SYNC_FLUSH'):
250 # Testing on 17K of "random" data
251
252 # Create compressor and decompressor objects
Neil Schemenauer6412b122004-06-05 19:34:28 +0000253 co = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000254 dco = zlib.decompressobj()
255
256 # Try 17K of data
257 # generate random data stream
258 try:
259 # In 2.3 and later, WichmannHill is the RNG of the bug report
260 gen = random.WichmannHill()
261 except AttributeError:
262 try:
263 # 2.2 called it Random
264 gen = random.Random()
265 except AttributeError:
266 # others might simply have a single RNG
267 gen = random
268 gen.seed(1)
269 data = genblock(1, 17 * 1024, generator=gen)
270
271 # compress, sync-flush, and decompress
272 first = co.compress(data)
273 second = co.flush(zlib.Z_SYNC_FLUSH)
274 expanded = dco.decompress(first + second)
275
276 # if decompressed data is different from the input data, choke.
277 self.assertEqual(expanded, data, "17K random source doesn't match")
278
Andrew M. Kuchling3b585b32004-12-28 20:10:48 +0000279 def test_empty_flush(self):
280 # Test that calling .flush() on unused objects works.
281 # (Bug #1083110 -- calling .flush() on decompress objects
282 # caused a core dump.)
283
284 co = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
285 self.failUnless(co.flush()) # Returns a zlib header
286 dco = zlib.decompressobj()
287 self.assertEqual(dco.flush(), "") # Returns nothing
Tim Peters5a9fb3c2005-01-07 16:01:32 +0000288
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000289 if hasattr(zlib.compressobj(), "copy"):
290 def test_compresscopy(self):
291 # Test copying a compression object
292 data0 = HAMLET_SCENE
293 data1 = HAMLET_SCENE.swapcase()
294 c0 = zlib.compressobj(zlib.Z_BEST_COMPRESSION)
295 bufs0 = []
296 bufs0.append(c0.compress(data0))
Thomas Wouters477c8d52006-05-27 19:21:47 +0000297
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000298 c1 = c0.copy()
299 bufs1 = bufs0[:]
Thomas Wouters477c8d52006-05-27 19:21:47 +0000300
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000301 bufs0.append(c0.compress(data0))
302 bufs0.append(c0.flush())
303 s0 = ''.join(bufs0)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000304
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000305 bufs1.append(c1.compress(data1))
306 bufs1.append(c1.flush())
307 s1 = ''.join(bufs1)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000308
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000309 self.assertEqual(zlib.decompress(s0),data0+data0)
310 self.assertEqual(zlib.decompress(s1),data0+data1)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000311
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000312 def test_badcompresscopy(self):
313 # Test copying a compression object in an inconsistent state
314 c = zlib.compressobj()
315 c.compress(HAMLET_SCENE)
316 c.flush()
317 self.assertRaises(ValueError, c.copy)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000318
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000319 if hasattr(zlib.decompressobj(), "copy"):
320 def test_decompresscopy(self):
321 # Test copying a decompression object
322 data = HAMLET_SCENE
323 comp = zlib.compress(data)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000324
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000325 d0 = zlib.decompressobj()
326 bufs0 = []
327 bufs0.append(d0.decompress(comp[:32]))
Thomas Wouters477c8d52006-05-27 19:21:47 +0000328
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000329 d1 = d0.copy()
330 bufs1 = bufs0[:]
Thomas Wouters477c8d52006-05-27 19:21:47 +0000331
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000332 bufs0.append(d0.decompress(comp[32:]))
333 s0 = ''.join(bufs0)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000334
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000335 bufs1.append(d1.decompress(comp[32:]))
336 s1 = ''.join(bufs1)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000337
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000338 self.assertEqual(s0,s1)
339 self.assertEqual(s0,data)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000340
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000341 def test_baddecompresscopy(self):
342 # Test copying a compression object in an inconsistent state
343 data = zlib.compress(HAMLET_SCENE)
344 d = zlib.decompressobj()
345 d.decompress(data)
346 d.flush()
347 self.assertRaises(ValueError, d.copy)
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000348
349def genblock(seed, length, step=1024, generator=random):
350 """length-byte stream of random data from a seed (in step-byte blocks)."""
351 if seed is not None:
352 generator.seed(seed)
353 randint = generator.randint
354 if length < step or step < 2:
355 step = length
356 blocks = []
357 for i in range(0, length, step):
358 blocks.append(''.join([chr(randint(0,255))
359 for x in range(step)]))
360 return ''.join(blocks)[:length]
361
362
363
364def choose_lines(source, number, seed=None, generator=random):
365 """Return a list of number lines randomly chosen from the source"""
366 if seed is not None:
367 generator.seed(seed)
368 sources = source.split('\n')
369 return [generator.choice(sources) for n in range(number)]
370
371
372
Neil Schemenauer6412b122004-06-05 19:34:28 +0000373HAMLET_SCENE = """
Fred Drake004d5e62000-10-23 17:22:08 +0000374LAERTES
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000375
376 O, fear me not.
377 I stay too long: but here my father comes.
378
379 Enter POLONIUS
380
381 A double blessing is a double grace,
382 Occasion smiles upon a second leave.
383
Fred Drake004d5e62000-10-23 17:22:08 +0000384LORD POLONIUS
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000385
386 Yet here, Laertes! aboard, aboard, for shame!
387 The wind sits in the shoulder of your sail,
388 And you are stay'd for. There; my blessing with thee!
389 And these few precepts in thy memory
390 See thou character. Give thy thoughts no tongue,
391 Nor any unproportioned thought his act.
392 Be thou familiar, but by no means vulgar.
393 Those friends thou hast, and their adoption tried,
394 Grapple them to thy soul with hoops of steel;
395 But do not dull thy palm with entertainment
396 Of each new-hatch'd, unfledged comrade. Beware
397 Of entrance to a quarrel, but being in,
398 Bear't that the opposed may beware of thee.
399 Give every man thy ear, but few thy voice;
400 Take each man's censure, but reserve thy judgment.
401 Costly thy habit as thy purse can buy,
402 But not express'd in fancy; rich, not gaudy;
403 For the apparel oft proclaims the man,
404 And they in France of the best rank and station
405 Are of a most select and generous chief in that.
406 Neither a borrower nor a lender be;
407 For loan oft loses both itself and friend,
408 And borrowing dulls the edge of husbandry.
409 This above all: to thine ownself be true,
410 And it must follow, as the night the day,
411 Thou canst not then be false to any man.
412 Farewell: my blessing season this in thee!
413
Fred Drake004d5e62000-10-23 17:22:08 +0000414LAERTES
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000415
416 Most humbly do I take my leave, my lord.
417
Fred Drake004d5e62000-10-23 17:22:08 +0000418LORD POLONIUS
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000419
420 The time invites you; go; your servants tend.
421
Fred Drake004d5e62000-10-23 17:22:08 +0000422LAERTES
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000423
424 Farewell, Ophelia; and remember well
425 What I have said to you.
426
Fred Drake004d5e62000-10-23 17:22:08 +0000427OPHELIA
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000428
429 'Tis in my memory lock'd,
430 And you yourself shall keep the key of it.
431
Fred Drake004d5e62000-10-23 17:22:08 +0000432LAERTES
Jeremy Hylton6eb4b6a1997-08-15 15:59:43 +0000433
434 Farewell.
435"""
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000436
437
438def test_main():
Walter Dörwald21d3a322003-05-01 17:45:56 +0000439 test_support.run_unittest(
440 ChecksumTestCase,
441 ExceptionTestCase,
442 CompressTestCase,
443 CompressObjectTestCase
444 )
Guido van Rossum7d9ea502003-02-03 20:45:52 +0000445
446if __name__ == "__main__":
447 test_main()