File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ def test_variable_invalid_init():
2424 with pytest .raises (ValueError , match = "to_write must be one of .*\. Got to_write=" ):
2525 Variable ("name" , to_write = "test" )
2626
27- with pytest .raises (ValueError , match = "to_write must be one of .*\. Got to_write= " ):
28- Variable ("name" , to_write = "test" )
27+ with pytest .raises (TypeError , match = "Expected a string for variable name, got int instead. " ):
28+ Variable (123 )
2929
3030 for name in ["a b" , "123" , "while" ]:
31- with pytest .raises (ValueError , match = "Particle variable has to be a valid Python variable name. Got " ):
31+ with pytest .raises (ValueError , match = r"Received invalid Python variable name.* " ):
3232 Variable (name )
3333
3434 with pytest .raises (ValueError , match = "Attributes cannot be set if to_write=False" ):
You can’t perform that action at this time.
0 commit comments