[vreg] should raise exception on select ambiguity when running in test mode
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 May 2010 15:06:29 +0200
changeset 5572 df5551d697e8
parent 5571 5d024bf9424b
child 5573 8dfb1726526b
[vreg] should raise exception on select ambiguity when running in test mode
vregistry.py
--- a/vregistry.py	Fri May 21 15:05:44 2010 +0200
+++ b/vregistry.py	Fri May 21 15:06:29 2010 +0200
@@ -226,8 +226,8 @@
                                      % (args, kwargs.keys(),
                                         [repr(v) for v in appobjects]))
         if len(winners) > 1:
-            # log in production environement, error while debugging
-            if self.config.debugmode:
+            # log in production environement / test, error while debugging
+            if self.config.debugmode or self.config.mode == 'test':
                 raise Exception('select ambiguity, args: %s\nkwargs: %s %s'
                                 % (args, kwargs.keys(),
                                    [repr(v) for v in winners]))