From: Rob Browning Date: Sat, 12 Jan 2019 22:22:14 +0000 (-0600) Subject: test_resolve_loop: ensure exception is actually thrown X-Git-Tag: 0.30~36 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=06da068a793cd12629f8be5d105bb3af281e61dd test_resolve_loop: ensure exception is actually thrown Make sure to resolve the correct path, and ensure the call never returns. Previously when the path was wrong, and it *was* wrong, the test would appear to succeed even though it wasn't actually testing the intended ELOOP case. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/t/tvfs.py b/lib/bup/t/tvfs.py index 6689291..86a038b 100644 --- a/lib/bup/t/tvfs.py +++ b/lib/bup/t/tvfs.py @@ -627,10 +627,11 @@ def test_resolve_loop(): data_path)) save_name = strftime('%Y-%m-%d-%H%M%S', localtime(save_utc)) try: - resolve(repo, '/test/%s/loop' % save_utc) + wvpasseq('this call should never return', + resolve(repo, '/test/%s/loop' % save_name)) except vfs.IOError as res_ex: wvpasseq(ELOOP, res_ex.errno) - wvpasseq(['', 'test', 'latest', 'loop'], + wvpasseq(['', 'test', save_name, 'loop'], [name for name, item in res_ex.terminus]) @wvtest