unittest.mock.sentinel

unittest.mock.sentinel

The sentinel object provides a convenient way of providing unique objects for your tests.

Attributes are created on demand when you access them by name. Accessing the same attribute will always return the same object. The objects returned have a sensible repr so that test failure messages are readable.

doc_python
2016-10-07 17:46:14
Comments
Leave a Comment

Please login to continue.