This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Petter S
Recipients Petter S
Date 2019-01-04.11:04:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546599891.86.0.0577370914139.issue35656@roundup.psfhosted.org>
In-reply-to
Content
The ``ANY`` object in ``unittest.mock`` is also pretty useful when verifying dicts in tests:

    self.assertEqual(result, {
        "message": "Hi!",
        "code": 0,
        "id": mock.ANY
    })

Then it does not matter what the (presumably randomly generated) id is. For the same use cases, objects like ``APPROXIMATE`` (for approximate floating-point matching) and ``MATCHES`` (taking a boolean lambda) would be pretty useful, I think.
History
Date User Action Args
2019-01-04 11:04:54Petter Ssetrecipients: + Petter S
2019-01-04 11:04:51Petter Ssetmessageid: <1546599891.86.0.0577370914139.issue35656@roundup.psfhosted.org>
2019-01-04 11:04:51Petter Slinkissue35656 messages
2019-01-04 11:04:51Petter Screate