(py_and_json: PyAndJson, input_value, expected)
| 128 | ], |
| 129 | ) |
| 130 | def test_date_json(py_and_json: PyAndJson, input_value, expected): |
| 131 | v = py_and_json({'type': 'date'}) |
| 132 | if isinstance(expected, Err): |
| 133 | with pytest.raises(ValidationError, match=re.escape(expected.message)): |
| 134 | v.validate_test(input_value) |
| 135 | assert v.isinstance_test(input_value) is False |
| 136 | else: |
| 137 | output = v.validate_test(input_value) |
| 138 | assert output == expected |
| 139 | assert v.isinstance_test(input_value) is True |
| 140 | |
| 141 | |
| 142 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected