File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 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):
28282828
28292829 def test_custom_hex_error_is_noted (self ):
28302830 # Check hex codec gives a good error for malformed input
2831+ import binascii
28312832 msg = "decoding with 'hex_codec' codec failed"
2832- with self .assertRaises (zlib . error ) as failure :
2833+ with self .assertRaises (binascii . Error ) as failure :
28332834 codecs .decode (b"hello" , "hex_codec" )
28342835 self .assertEqual (msg , failure .exception .__notes__ [0 ])
28352836
Original file line number Diff line number Diff line change @@ -2738,7 +2738,7 @@ def test_regular_copy(self):
27382738 def test_same_file (self ):
27392739 self .addCleanup (self .reset )
27402740 with self .get_files () as (src , dst ):
2741- with self .assertRaises (OSError ):
2741+ with self .assertRaises (( OSError , _GiveupOnFastCopy ) ):
27422742 self .zerocopy_fun (src , src )
27432743 # Make sure src file is not corrupted.
27442744 self .assertEqual (read_file (TESTFN , binary = True ), self .FILEDATA )
You can’t perform that action at this time.
0 commit comments