From c0dcbd0017ac73799e69bcc14a12f414406b5d50 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 2 Nov 2017 12:19:36 -0700 Subject: [PATCH] releasetools: Fix the doctest for rangelib.py. $ python rangelib.py ********************************************************************** File "rangelib.py", line 323, in __main__.RangeSet.next_item Failed example: list(rangelib.RangeSet("10-19 3 5 7").next_item()) Exception raised: Traceback (most recent call last): File "/usr/lib/python2.7/doctest.py", line 1315, in __run compileflags, 1) in test.globs File "", line 1, in list(rangelib.RangeSet("10-19 3 5 7").next_item()) NameError: name 'rangelib' is not defined ********************************************************************** 1 items had failures: 1 of 3 in __main__.RangeSet.next_item ***Test Failed*** 1 failures. Test: python rangelib.py Change-Id: I6c791ff4453f40d90b34f97b881460da9878fe64 --- tools/releasetools/rangelib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/rangelib.py b/tools/releasetools/rangelib.py index fa6eec108..87380a598 100644 --- a/tools/releasetools/rangelib.py +++ b/tools/releasetools/rangelib.py @@ -320,7 +320,7 @@ class RangeSet(object): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(RangeSet("10-19 3-5").next_item()) [3, 4, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] - >>> list(rangelib.RangeSet("10-19 3 5 7").next_item()) + >>> list(RangeSet("10-19 3 5 7").next_item()) [3, 5, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] """ for s, e in self: