changeset 1041:70090e2ee262

tests: assert that fetches actually succeed
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Fri, 02 Aug 2013 16:39:11 +0200
parents ada2400241c4
children af84ef787d93
files tests/test_util.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -171,7 +171,7 @@ def testui(stupid=False, layout='auto', 
 
 def dispatch(cmd):
     cmd = getattr(dispatchmod, 'request', lambda x: x)(cmd)
-    dispatchmod.dispatch(cmd)
+    return dispatchmod.dispatch(cmd)
 
 def rmtree(path):
     # Read-only files cannot be removed under Windows
@@ -370,7 +370,8 @@ class TestBase(unittest.TestCase):
         for k,v in reversed(sorted(config.iteritems())):
             cmd[:0] = ['--config', '%s=%s' % (k, v)]
 
-        dispatch(cmd)
+        r = dispatch(cmd)
+        assert not r, 'fetch of %s failed' % projectpath
 
         return hg.repository(testui(), self.wc_path)