Beispiel #1
0
 def test_exception_reserved(self, value, expected):
     with pytest.raises(expected):
         validate_python_var_name(value)
Beispiel #2
0
 def test_normal(self, value):
     validate_python_var_name(value)
Beispiel #3
0
 def test_exception_invalid_first_char(self, value):
     with pytest.raises(InvalidCharError):
         validate_python_var_name(value)
Beispiel #4
0
 def test_normal_invalid_first_char_x2(self, value, replace_text, expected):
     sanitized_name = sanitize_python_var_name(value, replace_text)
     assert sanitized_name == expected
     validate_python_var_name(sanitized_name)