summaryrefslogtreecommitdiff
path: root/factory/utils.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-04-12 00:14:33 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-14 01:10:04 +0200
commit2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f (patch)
tree9dc7cc3e9e56488326899feb37f612161969159a /factory/utils.py
parenta4460de7719eb8c8bb1f3aa72b2ce233b45d9a87 (diff)
downloadfactory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar
factory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar.gz
Add logging calls (Closes #45).
Diffstat (limited to 'factory/utils.py')
-rw-r--r--factory/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/factory/utils.py b/factory/utils.py
index fb8cfef..e1b265f 100644
--- a/factory/utils.py
+++ b/factory/utils.py
@@ -94,3 +94,10 @@ def import_object(module_name, attribute_name):
module = __import__(module_name, {}, {}, [attribute_name], 0)
return getattr(module, attribute_name)
+
+def log_pprint(args=(), kwargs=None):
+ kwargs = kwargs or {}
+ return ', '.join(
+ [str(arg) for arg in args] +
+ ['%s=%r' % item for item in kwargs.items()]
+ )