@@ -828,65 +828,65 @@ def test_0d_array(self):
828
828
(
829
829
[{}, []],
830
830
ValueError ,
831
- "nesting not supported for object or variable length dtypes" ,
831
+ r "nesting not supported for object or variable length dtypes" ,
832
832
{},
833
833
),
834
834
(
835
835
[42 , None ],
836
836
TypeError ,
837
- "int( ) argument must be a string, a bytes-like object or a number, "
838
- " not 'NoneType'" ,
837
+ r "int\(\ ) argument must be a string, a bytes-like object or a( real)? "
838
+ r"number, not 'NoneType'" ,
839
839
{},
840
840
),
841
841
(
842
842
[["a" ], 42 ],
843
843
ValueError ,
844
- "Cannot decode multidimensional arrays with variable length elements "
845
- "to numpy" ,
844
+ r "Cannot decode multidimensional arrays with variable length elements "
845
+ r "to numpy" ,
846
846
{},
847
847
),
848
848
(
849
849
[42 , {}, "a" ],
850
850
TypeError ,
851
- "int( ) argument must be a string, a bytes-like object or a number, "
852
- " not 'dict'" ,
851
+ r "int\(\ ) argument must be a string, a bytes-like object or a( real)? "
852
+ r"number, not 'dict'" ,
853
853
{},
854
854
),
855
855
(
856
856
[42 , ["a" ], 42 ],
857
857
ValueError ,
858
- "invalid literal for int( ) with base 10: 'a'" ,
858
+ r "invalid literal for int\(\ ) with base 10: 'a'" ,
859
859
{},
860
860
),
861
861
(
862
862
["a" , "b" , [], "c" ],
863
863
ValueError ,
864
- "nesting not supported for object or variable length dtypes" ,
864
+ r "nesting not supported for object or variable length dtypes" ,
865
865
{},
866
866
),
867
867
(
868
868
[{"a" : "b" }],
869
869
ValueError ,
870
- "Cannot decode multidimensional arrays with variable length elements "
871
- "to numpy" ,
870
+ r "Cannot decode multidimensional arrays with variable length elements "
871
+ r "to numpy" ,
872
872
{"labelled" : True },
873
873
),
874
874
(
875
875
{"a" : {"b" : {"c" : 42 }}},
876
876
ValueError ,
877
- "labels only supported up to 2 dimensions" ,
877
+ r "labels only supported up to 2 dimensions" ,
878
878
{"labelled" : True },
879
879
),
880
880
(
881
881
[{"a" : 42 , "b" : 23 }, {"c" : 17 }],
882
882
ValueError ,
883
- "cannot reshape array of size 3 into shape (2,1)" ,
883
+ r "cannot reshape array of size 3 into shape \ (2,1\ )" ,
884
884
{"labelled" : True },
885
885
),
886
886
],
887
887
)
888
888
def test_array_numpy_except (self , bad_input , exc_type , err_msg , kwargs ):
889
- with pytest .raises (exc_type , match = re . escape ( err_msg ) ):
889
+ with pytest .raises (exc_type , match = err_msg ):
890
890
ujson .decode (ujson .dumps (bad_input ), numpy = True , ** kwargs )
891
891
892
892
def test_array_numpy_labelled (self ):
0 commit comments