diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-09-17 00:28:48 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-09-17 00:28:54 +0200 |
commit | a8742c973db224968b74bb054027130b2ab458e0 (patch) | |
tree | e6aff374e0a4fc5f9bc9937c435bec08454f9279 /README | |
parent | da715e33bbba0428f0be25e8cc3ff4e88ec72bbb (diff) | |
download | factory-boy-a8742c973db224968b74bb054027130b2ab458e0.tar factory-boy-a8742c973db224968b74bb054027130b2ab458e0.tar.gz |
Add 'factory.debug' context manager.
Diffstat (limited to 'README')
-rw-r--r-- | README | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -188,10 +188,16 @@ Debugging factory_boy """"""""""""""""""""" Debugging factory_boy can be rather complex due to the long chains of calls. -Detailed logging is available through the ``factory`` logger: +Detailed logging is available through the ``factory`` logger. + +A helper, :meth:`factory.debug()`, is available to ease debugging: .. code-block:: python + with factory.debug(): + obj = TestModel2Factory() + + import logging logger = logging.getLogger('factory') logger.addHandler(logging.StreamHandler()) |