@@ -857,7 +857,7 @@ async def foo():
857
857
async with lop .Proxy (CM ):
858
858
pass
859
859
860
- with pytest .raises (TypeError , match = "'async with' received an object from __aenter__ " ' that does not implement __await__: int' ):
860
+ with pytest .raises (TypeError , match = "'async with' received an object from __aenter__ that does not implement __await__: int" ):
861
861
# it's important that __aexit__ wasn't called
862
862
run_async (lop .Proxy (foo ))
863
863
@@ -879,7 +879,7 @@ async def foo():
879
879
try :
880
880
run_async (lop .Proxy (foo ))
881
881
except TypeError as exc :
882
- assert re .search ("'async with' received an object from __aexit__ " ' that does not implement __await__: int' , exc .args [0 ])
882
+ assert re .search ("'async with' received an object from __aexit__ that does not implement __await__: int" , exc .args [0 ])
883
883
assert exc .__context__ is not None
884
884
assert isinstance (exc .__context__ , ZeroDivisionError )
885
885
else :
@@ -903,7 +903,7 @@ async def foo():
903
903
async with lop .Proxy (CM ):
904
904
CNT += 1
905
905
906
- with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ " ' that does not implement __await__: int' ):
906
+ with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ that does not implement __await__: int" ):
907
907
run_async (lop .Proxy (foo ))
908
908
assert CNT == 1
909
909
@@ -915,7 +915,7 @@ async def foo():
915
915
CNT += 1
916
916
break
917
917
918
- with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ " ' that does not implement __await__: int' ):
918
+ with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ that does not implement __await__: int" ):
919
919
run_async (lop .Proxy (foo ))
920
920
assert CNT == 2
921
921
@@ -927,7 +927,7 @@ async def foo():
927
927
CNT += 1
928
928
continue
929
929
930
- with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ " ' that does not implement __await__: int' ):
930
+ with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ that does not implement __await__: int" ):
931
931
run_async (lop .Proxy (foo ))
932
932
assert CNT == 3
933
933
@@ -938,7 +938,7 @@ async def foo():
938
938
CNT += 1
939
939
return
940
940
941
- with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ " ' that does not implement __await__: int' ):
941
+ with pytest .raises (TypeError , match = "'async with' received an object from __aexit__ that does not implement __await__: int" ):
942
942
run_async (lop .Proxy (foo ))
943
943
assert CNT == 4
944
944
0 commit comments