From: Rob Browning Date: Tue, 29 Dec 2015 02:00:05 +0000 (-0600) Subject: wvtest.py: set wvtest to wvtest module if __main__ X-Git-Tag: 0.28-rc1~43 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=f91c50493ced972865b5f3f4c595c581c58c9fde;hp=cbba3f22b687cac8c1a96f79c9f16965c455faea 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 --- 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:])