MCPcopy
hub / github.com/pytest-dev/pytest / __repr__

Method __repr__

src/_pytest/python_api.py:324–328  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

322 """Perform approximate comparisons where the expected value is a sequence of numbers."""
323
324 def __repr__(self) -> str:
325 seq_type = type(self.expected)
326 if seq_type not in (tuple, list):
327 seq_type = list
328 return f"approx({seq_type(self._approx_scalar(x) for x in self.expected)!r})"
329
330 def _repr_compare(self, other_side: Sequence[float]) -> list[str]:
331 import math

Callers

nothing calls this directly

Calls 1

_approx_scalarMethod · 0.80

Tested by

no test coverage detected