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

Method test_dict_decimal

testing/python/approx.py:598–604  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

596 assert approx(expected, rel=5e-8, abs=0) != actual
597
598 def test_dict_decimal(self):
599 actual = {"a": Decimal("1.000001"), "b": Decimal("2.000001")}
600 # Dictionaries became ordered in python3.6, so switch up the order here
601 # to make sure it doesn't matter.
602 expected = {"b": Decimal("2"), "a": Decimal("1")}
603
604 assert actual == approx(expected)
605
606 def test_dict_wrong_len(self):
607 assert {"a": 1, "b": 2} != approx({"a": 1})

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected