From: Christian Herdtweck Date: Fri, 17 Jun 2016 14:02:27 +0000 (+0200) Subject: improve one more unittest: raise proper assertion instead of failing with non-existen... X-Git-Tag: v2.2~24 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=10798176675d3cf8bb35d0e5f730f630ffb20c81;p=python-delta-tar improve one more unittest: raise proper assertion instead of failing with non-existent variable --- diff --git a/testing/test_deltatar.py b/testing/test_deltatar.py index 112b546..e7cbe97 100644 --- a/testing/test_deltatar.py +++ b/testing/test_deltatar.py @@ -389,6 +389,7 @@ class DeltaTarTest(BaseTest): # this should automatically restore the huge file f = deltatar.open_index(index_path, 'r') + offset = None while True: l = f.readline() if not len(l): @@ -399,6 +400,8 @@ class DeltaTarTest(BaseTest): offset = data['offset'] break + assert offset is not None + fo = open(tar_path, 'rb') fo.seek(offset) def new_volume_handler(mode, tarobj, base_name, volume_number):