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:
|
||||
__tracebackhide__ = True
|
||||
for index, x in enumerate(self.expected):
|
||||
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(
|
||||
x, STRING_TYPES
|
||||
):
|
||||
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(x, str):
|
||||
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)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue