MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_nonnumeric_dict_repr

Method test_nonnumeric_dict_repr

testing/python/approx.py:814–820  ·  view source on GitHub ↗

Dicts with non-numerics and infinites have no tolerances

(self)

Source from the content-addressed store, hash-verified

812
813 @pytest.mark.skipif(sys.version_info < (3, 7), reason="requires ordered dicts")
814 def test_nonnumeric_dict_repr(self):
815 """Dicts with non-numerics and infinites have no tolerances"""
816 x1 = {"foo": 1.0000005, "bar": None, "foobar": inf}
817 assert (
818 repr(approx(x1))
819 == "approx({'foo': 1.0000005 ± 1.0e-06, 'bar': None, 'foobar': inf})"
820 )
821
822 def test_nonnumeric_list_repr(self):
823 """Lists with non-numerics and infinites have no tolerances"""

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected