@@ -117,7 +117,7 @@ def test_make_vdom_constructor():
117117
118118 no_children = Vdom ("no-children" , allow_children = False )
119119
120- with pytest .raises (TypeError , match = "cannot have children" ):
120+ with pytest .raises (TypeError , match = r "cannot have children" ):
121121 no_children ([1 , 2 , 3 ])
122122
123123 assert no_children () == {"tagName" : "no-children" }
@@ -127,7 +127,7 @@ def test_nested_html_access_raises_error():
127127 elmt = Vdom ("div" )
128128
129129 with pytest .raises (
130- AttributeError , match = "can only be accessed on web module components"
130+ AttributeError , match = r "can only be accessed on web module components"
131131 ):
132132 elmt .fails ()
133133
@@ -330,16 +330,16 @@ def MyComponent():
330330
331331@pytest .mark .skipif (not REACTPY_DEBUG .current , reason = "only checked in debug mode" )
332332def test_raise_for_non_json_attrs ():
333- with pytest .raises (TypeError , match = "JSON serializable" ):
333+ with pytest .raises (TypeError , match = r "JSON serializable" ):
334334 reactpy .html .div ({"nonJsonSerializableObject" : object ()})
335335
336336
337337def test_invalid_vdom_keys ():
338- with pytest .raises (ValueError , match = "Invalid keys:*" ):
338+ with pytest .raises (ValueError , match = r "Invalid keys:*" ):
339339 reactpy .types .VdomDict (tagName = "test" , foo = "bar" )
340340
341- with pytest .raises (KeyError , match = "Invalid key:*" ):
341+ with pytest .raises (KeyError , match = r "Invalid key:*" ):
342342 reactpy .types .VdomDict (tagName = "test" )["foo" ] = "bar"
343343
344- with pytest .raises (ValueError , match = "VdomDict requires a 'tagName' key." ):
344+ with pytest .raises (ValueError , match = r "VdomDict requires a 'tagName' key." ):
345345 reactpy .types .VdomDict (foo = "bar" )
0 commit comments