STRING_TYPES is not necessary anymore
This commit is contained in:
parent
6a9dc37cf1
commit
f988bc41d8
|
@ -376,9 +376,7 @@ class ApproxSequenceLike(ApproxBase):
|
||||||
def _check_type(self) -> None:
|
def _check_type(self) -> None:
|
||||||
__tracebackhide__ = True
|
__tracebackhide__ = True
|
||||||
for index, x in enumerate(self.expected):
|
for index, x in enumerate(self.expected):
|
||||||
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(
|
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(x, str):
|
||||||
x, STRING_TYPES
|
|
||||||
):
|
|
||||||
msg = "pytest.approx() does not support nested data structures: {!r} at index {}\n full sequence: {}"
|
msg = "pytest.approx() does not support nested data structures: {!r} at index {}\n full sequence: {}"
|
||||||
raise TypeError(msg.format(x, index, pprint.pformat(self.expected)))
|
raise TypeError(msg.format(x, index, pprint.pformat(self.expected)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue