コード例 #1
0
 def test_write_data_default_compress_type_is_from_init(
         self, buf, tmp_file):
     wf = WheelFile(buf,
                    'w',
                    distname='_',
                    version='0',
                    compression=ZIP_BZIP2)
     wf.write_data(tmp_file, 'section')
     assert wf.infolist()[0].compress_type == ZIP_BZIP2
コード例 #2
0
 def test_write_data_default_compress_type_is_deflate(self, buf, tmp_file):
     wf = WheelFile(buf, 'w', distname='_', version='0')
     wf.write_data(tmp_file, 'section')
     assert wf.infolist()[0].compress_type == ZIP_DEFLATED
コード例 #3
0
 def test_write_data_default_compresslevel_is_from_init(
         self, buf, tmp_file):
     wf = WheelFile(buf, 'w', distname='_', version='0', compresslevel=9)
     wf.write_data(tmp_file, 'section')
     assert wf.infolist()[0]._compresslevel == 9