@@ -1821,19 +1821,13 @@ def test_extract_7z_with_trailing_data(self):
1821
1821
def test_extract_7z_with_broken_archive_with7z (self ):
1822
1822
test_file = self .get_test_loc ('archive/7z/corrupted7z.7z' )
1823
1823
test_dir = self .get_temp_dir ()
1824
- if on_mac :
1825
- msg = 'Incorrect 7zip listing with multiple headers'
1826
- else :
1827
- msg = 'There are data after the end of archive'
1824
+ msg = 'There are data after the end of archive'
1828
1825
self .assertExceptionContains (msg , sevenzip .extract , test_file , test_dir )
1829
1826
1830
1827
def test_extract_7z_with_broken_archive_does_not_fail_when_using_fallback (self ):
1831
1828
test_file = self .get_test_loc ('archive/7z/corrupted7z.7z' )
1832
1829
test_dir = self .get_temp_dir ()
1833
- if on_mac :
1834
- msg = 'Incorrect 7zip listing with multiple headers'
1835
- else :
1836
- msg = 'There are data after the end of archive'
1830
+ msg = 'There are data after the end of archive'
1837
1831
self .assertExceptionContains (msg , archive .extract_7z , test_file , test_dir )
1838
1832
1839
1833
def test_extract_7z_with_non_existing_archive (self ):
@@ -2450,34 +2444,33 @@ class TestExtractArchiveWithIllegalFilenamesWithSevenzipOnMac(ExtractArchiveWith
2450
2444
def test_extract_7zip_with_weird_filenames_with_sevenzip_macos (self ):
2451
2445
test_file = self .get_test_loc ('archive/weird_names/weird_names.7z' )
2452
2446
expected_exception = {
2453
- "weird_names/some 'file" : 'Empty archive or incorrect arguments' ,
2454
- 'weird_names/some file' : 'Empty archive or incorrect arguments' ,
2455
- 'weird_names/some \\ file' : 'Empty archive or incorrect arguments' ,
2456
- 'weird_names/some"file' : 'Empty archive or incorrect arguments' ,
2457
- 'weird_names/some\\ "file' : 'Empty archive or incorrect arguments' ,
2458
- 'weird_names/man\\ 1/..1.gz' : 'Empty archive or incorrect arguments' ,
2459
- 'weird_names/man\\ 1/[.1.gz' : 'Empty archive or incorrect arguments' ,
2460
- 'weird_names/man\\ 1/\\ :.1.gz' : 'Empty archive or incorrect arguments' ,
2461
- 'weird_names/man\\ 1/:\\ .1' : 'Empty archive or incorrect arguments' ,
2462
- 'weird_names/man\\ 1/[\\ :*.1' : 'Empty archive or incorrect arguments' ,
2463
- 'weird_names/winchr/ab\t .t' : 'Empty archive or incorrect arguments' ,
2464
- 'weird_names/winchr/ab\n .t' : 'Empty archive or incorrect arguments' ,
2465
- 'weird_names/winchr/ab".t"' : 'Empty archive or incorrect arguments' ,
2466
- 'weird_names/winchr/ab*.t*' : 'Empty archive or incorrect arguments' ,
2467
- 'weird_names/winchr/ab<.t<' : 'Empty archive or incorrect arguments' ,
2468
- 'weird_names/winchr/ab>.t>' : 'Empty archive or incorrect arguments' ,
2469
- 'weird_names/winchr/ab?.t?' : 'Empty archive or incorrect arguments' ,
2470
- 'weird_names/winchr/ab\\ .t\\ ' : 'Empty archive or incorrect arguments' ,
2471
- 'weird_names/winchr/ab|.t|' : 'Empty archive or incorrect arguments' ,
2472
- 'weird_names/man\\ 1' : 'Empty archive or incorrect arguments'
2447
+ 'weird_names/man\\ 1/..1.gz' : u'Empty archive or incorrect arguments' ,
2448
+ 'weird_names/man\\ 1/:\\ .1' : u'Empty archive or incorrect arguments' ,
2449
+ 'weird_names/man\\ 1/[.1.gz' : u'Empty archive or incorrect arguments' ,
2450
+ 'weird_names/man\\ 1/[\\ :*.1' : u'Empty archive or incorrect arguments' ,
2451
+ 'weird_names/man\\ 1/\\ :.1.gz' : u'Empty archive or incorrect arguments' ,
2452
+ "weird_names/some 'file" : u'Empty archive or incorrect arguments' ,
2453
+ 'weird_names/some \\ file' : u'Empty archive or incorrect arguments' ,
2454
+ 'weird_names/some file' : u'Empty archive or incorrect arguments' ,
2455
+ 'weird_names/some"file' : u'Empty archive or incorrect arguments' ,
2456
+ 'weird_names/some\\ "file' : u'Empty archive or incorrect arguments' ,
2457
+ 'weird_names/winchr/ab\t .t' : u'Empty archive or incorrect arguments' ,
2458
+ 'weird_names/winchr/ab\n .t' : u'Empty archive or incorrect arguments' ,
2459
+ 'weird_names/winchr/ab".t"' : u'Empty archive or incorrect arguments' ,
2460
+ 'weird_names/winchr/ab*.t*' : u'Empty archive or incorrect arguments' ,
2461
+ 'weird_names/winchr/ab<.t<' : u'Empty archive or incorrect arguments' ,
2462
+ 'weird_names/winchr/ab>.t>' : u'Empty archive or incorrect arguments' ,
2463
+ 'weird_names/winchr/ab?.t?' : u'Empty archive or incorrect arguments' ,
2464
+ 'weird_names/winchr/ab\\ .t\\ ' : u'Empty archive or incorrect arguments' ,
2465
+ 'weird_names/winchr/ab|.t|' : u'Empty archive or incorrect arguments' ,
2473
2466
}
2474
2467
2475
2468
self .check_extract_weird_names (
2476
2469
sevenzip .extract ,
2477
2470
test_file ,
2478
2471
expected_warnings = [],
2479
2472
expected_suffix = '7zip' ,
2480
- expected_exception = expected_exception )
2473
+ expected_exception = expected_exception , regen = False )
2481
2474
2482
2475
def test_extract_ar_with_weird_filenames_with_sevenzip_macos (self ):
2483
2476
test_file = self .get_test_loc ('archive/weird_names/weird_names.ar' )
@@ -2502,7 +2495,7 @@ def test_extract_ar_with_weird_filenames_with_sevenzip_macos(self):
2502
2495
test_file ,
2503
2496
expected_warnings = [],
2504
2497
expected_suffix = '7zip' ,
2505
- expected_exception = expected_exception )
2498
+ expected_exception = expected_exception , regen = False )
2506
2499
2507
2500
def test_extract_cpio_with_weird_filenames_with_sevenzip_macos (self ):
2508
2501
test_file = self .get_test_loc ('archive/weird_names/weird_names.cpio' )
@@ -2533,19 +2526,23 @@ def test_extract_cpio_with_weird_filenames_with_sevenzip_macos(self):
2533
2526
test_file ,
2534
2527
expected_warnings = [],
2535
2528
expected_suffix = '7zip' ,
2536
- expected_exception = expected_exception )
2529
+ expected_exception = expected_exception , regen = False )
2537
2530
2538
2531
@pytest .mark .xfail
2539
2532
def test_extract_rar_with_weird_filenames_with_sevenzip_macos (self ):
2540
2533
test_file = self .get_test_loc ('archive/weird_names/weird_names.rar' )
2541
2534
self .check_extract_weird_names (
2542
- sevenzip .extract , test_file , expected_warnings = [], expected_suffix = '7zip' )
2535
+ sevenzip .extract ,
2536
+ test_file ,
2537
+ expected_warnings = [],
2538
+ expected_suffix = '7zip' ,
2539
+ regen = False )
2543
2540
2544
2541
def test_extract_iso_with_weird_filenames_with_sevenzip_macos (self ):
2545
2542
test_file = self .get_test_loc ('archive/weird_names/weird_names.iso' )
2546
2543
expected_exception = {
2547
2544
'weird_names/man_1/[.1.gz' : 'Empty archive or incorrect arguments' ,
2548
- 'weird_names/man_1/[___.1' : 'Empty archive or incorrect arguments' ,
2545
+ 'weird_names/man_1/[___.1' : 'Empty archive or incorrect arguments' ,
2549
2546
"weird_names/some 'file" : 'Empty archive or incorrect arguments' ,
2550
2547
'weird_names/some _file' : 'Empty archive or incorrect arguments' ,
2551
2548
'weird_names/some file' : 'Empty archive or incorrect arguments' ,
@@ -2562,7 +2559,7 @@ def test_extract_iso_with_weird_filenames_with_sevenzip_macos(self):
2562
2559
test_file ,
2563
2560
expected_warnings = [],
2564
2561
expected_suffix = '7zip' ,
2565
- expected_exception = expected_exception )
2562
+ expected_exception = expected_exception , regen = False )
2566
2563
2567
2564
def test_extract_tar_with_weird_filenames_with_sevenzip_macos (self ):
2568
2565
test_file = self .get_test_loc ('archive/weird_names/weird_names.tar' )
@@ -2593,7 +2590,7 @@ def test_extract_tar_with_weird_filenames_with_sevenzip_macos(self):
2593
2590
test_file ,
2594
2591
expected_warnings = [],
2595
2592
expected_suffix = '7zip' ,
2596
- expected_exception = expected_exception )
2593
+ expected_exception = expected_exception , regen = False )
2597
2594
2598
2595
def test_extract_zip_with_weird_filenames_with_sevenzip_macos (self ):
2599
2596
test_file = self .get_test_loc ('archive/weird_names/weird_names.zip' )
@@ -2624,7 +2621,7 @@ def test_extract_zip_with_weird_filenames_with_sevenzip_macos(self):
2624
2621
test_file ,
2625
2622
expected_warnings = [],
2626
2623
expected_suffix = '7zip' ,
2627
- expected_exception = expected_exception )
2624
+ expected_exception = expected_exception , regen = False )
2628
2625
2629
2626
2630
2627
@pytest .mark .skipif (not on_windows , reason = 'Run only on Windows because of specific test expectations.' )
0 commit comments