def test_nonnumeric_false_if_unequal(self, x):
        """For non-numeric types, x != pytest.approx(y) reduces to x != y"""
        assert "ab" != approx("abc")
        assert ["ab"] != approx(["abc"])
        # in particular, both of these should return False
        assert {"a": 1.0} != approx({"a": None})
        assert {"a": None} != approx({"a": 1.0})

        assert 1.0 != approx(None)
        assert None != approx(1.0)  # noqa: E711

        assert 1.0 != approx([None])
        assert None != approx([1.0])  # noqa: E711
For non-numeric types, x != pytest.approx(y) reduces to x != y
testing/python/approx.py