summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-09-17 00:28:48 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-09-17 00:28:54 +0200
commita8742c973db224968b74bb054027130b2ab458e0 (patch)
treee6aff374e0a4fc5f9bc9937c435bec08454f9279 /README
parentda715e33bbba0428f0be25e8cc3ff4e88ec72bbb (diff)
downloadfactory-boy-a8742c973db224968b74bb054027130b2ab458e0.tar
factory-boy-a8742c973db224968b74bb054027130b2ab458e0.tar.gz
Add 'factory.debug' context manager.
Diffstat (limited to 'README')
-rw-r--r--README8
1 files changed, 7 insertions, 1 deletions
diff --git a/README b/README
index bc5b55f..0371b28 100644
--- a/README
+++ b/README
@@ -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())