(is_local)
| 75 | |
| 76 | @pytest.mark.parametrize("is_local", [True, False]) |
| 77 | def test_catch_undefined_variable_error(is_local): |
| 78 | variable_name = "x" |
| 79 | if is_local: |
| 80 | msg = f"local variable '{variable_name}' is not defined" |
| 81 | else: |
| 82 | msg = f"name '{variable_name}' is not defined" |
| 83 | |
| 84 | with pytest.raises(UndefinedVariableError, match=msg): |
| 85 | raise UndefinedVariableError(variable_name, is_local) |
| 86 | |
| 87 | |
| 88 | class Foo: |
nothing calls this directly
no test coverage detected