X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=wvtest.py;h=8b5ab647e47e270caccbd67c31789211b32f6ce8;hb=aab82669cb0efd0a275e0ccd14ee779e894455ea;hp=2f48ef62acfa56a4cfdd850095f7d76b4c54ea29;hpb=c40b3dd5fd74e72024fbaad3daf5a958aefa1c54;p=bup.git diff --git a/wvtest.py b/wvtest.py index 2f48ef6..8b5ab64 100755 --- a/wvtest.py +++ b/wvtest.py @@ -86,6 +86,14 @@ if __name__ != '__main__': # we're imported as a module _result(msg, tb, 'FAILED') return cond + def wvcheck(cond, msg, tb = None): + if tb == None: tb = _caller_stack(2) + if cond: + _result(msg, tb, 'ok') + else: + _result(msg, tb, 'FAILED') + return cond + _code_rx = re.compile(r'^\w+\((.*)\)(\s*#.*)?$') def _code(): text = _caller_stack(2)[3]