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 "<doctest __main__.RangeSet.next_item[2]>", line 1, in <module>
        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
This commit is contained in:
Tao Bao 2017-11-02 12:19:36 -07:00
parent 1c505a1985
commit c0dcbd0017
1 changed files with 1 additions and 1 deletions

View File

@ -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: