File tree 2 files changed +3
-2
lines changed 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2828,8 +2828,9 @@ def test_custom_zlib_error_is_noted(self):
2828
2828
2829
2829
def test_custom_hex_error_is_noted (self ):
2830
2830
# Check hex codec gives a good error for malformed input
2831
+ import binascii
2831
2832
msg = "decoding with 'hex_codec' codec failed"
2832
- with self .assertRaises (zlib . error ) as failure :
2833
+ with self .assertRaises (binascii . Error ) as failure :
2833
2834
codecs .decode (b"hello" , "hex_codec" )
2834
2835
self .assertEqual (msg , failure .exception .__notes__ [0 ])
2835
2836
Original file line number Diff line number Diff line change @@ -2738,7 +2738,7 @@ def test_regular_copy(self):
2738
2738
def test_same_file (self ):
2739
2739
self .addCleanup (self .reset )
2740
2740
with self .get_files () as (src , dst ):
2741
- with self .assertRaises (OSError ):
2741
+ with self .assertRaises (( OSError , _GiveupOnFastCopy ) ):
2742
2742
self .zerocopy_fun (src , src )
2743
2743
# Make sure src file is not corrupted.
2744
2744
self .assertEqual (read_file (TESTFN , binary = True ), self .FILEDATA )
You can’t perform that action at this time.
0 commit comments