(self, py_input, strict: bool | None = None, context: Any = None)
| 88 | return self.validator.validate_python(py_input, strict=strict, context=context, extra=extra) |
| 89 | |
| 90 | def isinstance_test(self, py_input, strict: bool | None = None, context: Any = None): |
| 91 | if self.validator_type == 'json': |
| 92 | try: |
| 93 | self.validator.validate_json(json.dumps(py_input), strict=strict, context=context) |
| 94 | return True |
| 95 | except ValidationError: |
| 96 | return False |
| 97 | else: |
| 98 | assert self.validator_type == 'python', self.validator_type |
| 99 | return self.validator.isinstance_python(py_input, strict=strict, context=context) |
| 100 | |
| 101 | |
| 102 | PyAndJson = type[PyAndJsonValidator] |
no test coverage detected