Skip to content

Commit 100940c

Browse files
committed
Revert "fixme: skip tests broken due to exception removed upstream"
This reverts commit 8eae13c.
1 parent c19223c commit 100940c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pyramid_openapi3/exceptions.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from dataclasses import dataclass
44
from openapi_core.exceptions import OpenAPIError
5-
# from openapi_core.unmarshalling.schemas.exceptions import FormatUnmarshalError
5+
from openapi_core.unmarshalling.schemas.exceptions import FormatUnmarshalError
66
from pyramid.httpexceptions import HTTPBadRequest
77
from pyramid.httpexceptions import HTTPInternalServerError
88
from pyramid.request import Request
@@ -49,17 +49,14 @@ def __str__(self) -> str:
4949

5050

5151
@dataclass
52-
# class InvalidCustomFormatterValue(FormatUnmarshalError):
53-
# FIXME: `FormatUnmarshalError` is not available in `openapi-core` 0.19.0
54-
# See https://github.com/python-openapi/openapi-core/pull/562
55-
class InvalidCustomFormatterValue(Exception):
52+
class InvalidCustomFormatterValue(FormatUnmarshalError):
5653
"""Value failed to format with a custom formatter."""
5754

5855
field: str
5956

6057
def __str__(self) -> str:
6158
"""Provide more control over error message."""
62-
return str(self.original_exception) # type: ignore
59+
return str(self.original_exception)
6360

6461

6562
class ImproperAPISpecificationWarning(UserWarning):

pyramid_openapi3/tests/test_extract_errors.py

-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ def foo(*args: t.Any) -> Exception:
556556
]
557557

558558

559-
@unittest.skip("Needs to be re-implemented")
560559
class CustomFormattersTests(unittest.TestCase):
561560
"""A suite of tests that showcase how custom formatters can be used."""
562561

0 commit comments

Comments
 (0)