@@ -51,7 +51,7 @@ def generate_random(size, choice=random.choice, ALL_CHARS=ALL_CHARS):
5151 return s
5252
5353class TestPyLZMA (unittest .TestCase ):
54-
54+
5555 def setUp (self ):
5656 self .plain = bytes ('hello, this is a test string' , 'ascii' )
5757 self .plain_with_eos = unhexlify ('5d0000800000341949ee8def8c6b64909b1386e370bebeb1b656f5736d653c127731a214ff7031c000' )
@@ -64,17 +64,17 @@ def test_compression_eos(self):
6464 # test compression with end of stream marker
6565 compressed = pylzma .compress (self .plain , eos = 1 )
6666 self .assertEqual (compressed , self .plain_with_eos )
67-
67+
6868 def test_compression_no_eos (self ):
6969 # test compression without end of stream marker
7070 compressed = pylzma .compress (self .plain , eos = 0 )
7171 self .assertEqual (compressed , self .plain_without_eos )
72-
72+
7373 def test_decompression_eos (self ):
7474 # test decompression with the end of stream marker
7575 decompressed = pylzma .decompress (self .plain_with_eos )
7676 self .assertEqual (decompressed , self .plain )
77-
77+
7878 def test_decompression_noeos (self ):
7979 # test decompression without the end of stream marker
8080 decompressed = pylzma .decompress (self .plain_without_eos , maxlength = 28 )
@@ -109,7 +109,7 @@ def test_decompression_stream(self):
109109 data = decompress .decompress (self .plain_with_eos )
110110 data += decompress .flush ()
111111 self .assertEqual (data , self .plain )
112-
112+
113113 def test_decompression_stream_two (self ):
114114 # test decompression in two steps
115115 decompress = pylzma .decompressobj ()
@@ -187,7 +187,7 @@ def test_compression_file(self):
187187 self .assertEqual (check , self .plain )
188188
189189 if sys .version_info [:2 ] < (3 , 0 ):
190-
190+
191191 def test_compression_file_python (self ):
192192 # test compressing from file-like object (Python class)
193193 from StringIO import StringIO as PyStringIO
@@ -265,7 +265,7 @@ def suite():
265265 ]
266266
267267 for tc in test_cases :
268- suite .addTest (unittest .makeSuite (tc ))
268+ suite .addTest (unittest .defaultTestLoader . loadTestsFromTestCase (tc ))
269269
270270 return suite
271271
0 commit comments