]> arthur.barton.de Git - bup.git/commit
wvpytest: add fail_value argument to wvpass and wvpasseq
authorRob Browning <rlb@defaultvalue.org>
Tue, 28 Jun 2022 21:37:00 +0000 (16:37 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 1 Jul 2022 19:17:05 +0000 (14:17 -0500)
commitd163393f491ad8ffb20336eadec46b3688b6951a
treeebccd5f30e118871ba6db5e050bf3a15b8f22bb1
parentb7c608ddc2a1308a94f3e6a5893df1f141343a76
wvpytest: add fail_value argument to wvpass and wvpasseq

This is analagous to the second, optional assert argument, although
unlike that one, it is of course always evaluated.

It can allow more informative failures:

  wvpasseq(re.split(r'[0-9]+', s), exp,
           "re.split(r'[0-9]+', %r) != %r" % (s, exp))

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
test/lib/wvpytest.py