From f91c50493ced972865b5f3f4c595c581c58c9fde Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Mon, 28 Dec 2015 20:00:05 -0600 Subject: [PATCH 1/1] wvtest.py: set wvtest to wvtest module if __main__ Without this, references to wvtest.* may fail, which can be demonstrated (for example) by adding a "raise AttributeError('foo')' to _add_posix1e_acl just before the "if posix1e.has_extended(path)" test. Then "./wvtest.py lib/bup/t/tgit.py" will fail in the end with: NameError: global name 'wvtest' is not defined As a result, wvtest.py never prints a "! ... FAILED" message for the test, and so "wvtest report" never realizes there was a problem, and then "make check" exits with zero status. Signed-off-by: Rob Browning Tested-by: Rob Browning --- wvtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wvtest.py b/wvtest.py index 1c2981e..ef03381 100755 --- a/wvtest.py +++ b/wvtest.py @@ -226,4 +226,5 @@ if __name__ == '__main__': import wvtest as _wvtestmod sys.modules['wvtest'] = _wvtestmod sys.modules['wvtest.wvtest'] = _wvtestmod + wvtest = _wvtestmod wvtest_main(sys.argv[1:]) -- 2.39.2