Created
March 5, 2018 20:21
-
-
Save jaraco/10312ab82a7b1dd2cadf569e6cf079c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python develop-inst-nodeps: /Users/jaraco/Dropbox/code/main/jaraco.itertools | |
python installed: attrs==17.4.0,collective.checkdocs==0.2,docutils==0.14,inflect==0.2.5,-e git+gh://jaraco/jaraco.itertools@3a3d73e7def3403e067c5c715da9529a35b1c378#egg=jaraco.itertools,more-itertools==4.1.0,pluggy==0.6.0,py==1.5.2,pytest==3.4.1,pytest-sugar==0.9.1,six==1.11.0,termcolor==1.1.0 | |
python runtests: PYTHONHASHSEED='3026495925' | |
python runtests: commands[0] | py.test | |
============================= test session starts ============================== | |
platform darwin -- Python 3.7.0b2, pytest-3.4.1, py-1.5.2, pluggy-0.6.0 | |
rootdir: /Users/jaraco/Dropbox/code/main/jaraco.itertools, inifile: pytest.ini | |
plugins: sugar-0.9.1 | |
collected 32 items | |
jaraco/itertools.py ..FF......FF.............F...... [100%] | |
=================================== FAILURES =================================== | |
___________________ [doctest] jaraco.itertools.FetchingQueue ___________________ | |
150 | |
151 A FIFO Queue that is supplied with a function to inject more into | |
152 the queue if it is empty. | |
153 | |
154 >>> values = iter(range(10)) | |
155 >>> get_value = lambda: globals()['q'].enqueue(next(values)) | |
156 >>> q = FetchingQueue(get_value) | |
157 >>> [x for x in q] == list(range(10)) | |
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration') | |
Traceback (most recent call last): | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 180, in __iter__ | |
yield next(self) | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 174, in __next__ | |
self._fetcher() | |
File "<doctest jaraco.itertools.FetchingQueue[1]>", line 1, in <lambda> | |
StopIteration | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run | |
compileflags, 1), test.globs) | |
File "<doctest jaraco.itertools.FetchingQueue[3]>", line 1, in <module> | |
File "<doctest jaraco.itertools.FetchingQueue[3]>", line 1, in <listcomp> | |
RuntimeError: generator raised StopIteration | |
/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py:157: UnexpectedException | |
___________________ [doctest] jaraco.itertools.GroupbySaved ____________________ | |
075 element in the sequence. | |
076 | |
077 >>> truthsplit = GroupbySaved(['Test', '', 30, None], bool) | |
078 >>> truthsplit['x'] | |
079 Traceback (most recent call last): | |
080 ... | |
081 KeyError: 'x' | |
082 >>> true_items = truthsplit[True] | |
083 >>> false_items = truthsplit[False] | |
084 >>> tuple(iter(false_items)) | |
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration') | |
Traceback (most recent call last): | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 180, in __iter__ | |
yield next(self) | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 174, in __next__ | |
self._fetcher() | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 118, in __fetch__ | |
item = next(self.sequence) | |
StopIteration | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run | |
compileflags, 1), test.globs) | |
File "<doctest jaraco.itertools.GroupbySaved[4]>", line 1, in <module> | |
RuntimeError: generator raised StopIteration | |
/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py:84: UnexpectedException | |
______________________ [doctest] jaraco.itertools.bisect _______________________ | |
047 | |
048 Split a sequence into two sequences: the first is elements that | |
049 return False for func(element) and the second for True for | |
050 func(element). | |
051 By default, func is ``bool``, so uses the truth value of the object. | |
052 | |
053 >>> is_odd = lambda n: n%2 | |
054 >>> even, odd = bisect(range(5), is_odd) | |
055 >>> list(odd) | |
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration') | |
Traceback (most recent call last): | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 180, in __iter__ | |
yield next(self) | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 174, in __next__ | |
self._fetcher() | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 118, in __fetch__ | |
item = next(self.sequence) | |
StopIteration | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run | |
compileflags, 1), test.globs) | |
File "<doctest jaraco.itertools.bisect[2]>", line 1, in <module> | |
RuntimeError: generator raised StopIteration | |
/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py:55: UnexpectedException | |
____________________ [doctest] jaraco.itertools.every_other ____________________ | |
581 | |
582 Yield every other item from the iterable | |
583 | |
584 >>> ' '.join(every_other('abcdefg')) | |
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration') | |
Traceback (most recent call last): | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 590, in every_other | |
next(items) | |
StopIteration | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run | |
compileflags, 1), test.globs) | |
File "<doctest jaraco.itertools.every_other[0]>", line 1, in <module> | |
RuntimeError: generator raised StopIteration | |
/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py:584: UnexpectedException | |
_________________ [doctest] jaraco.itertools.remove_duplicates _________________ | |
594 | |
595 Given an iterable with items that may come in as sequential duplicates, | |
596 remove those duplicates. | |
597 | |
598 Unlike unique_justseen, this function does not remove triplicates. | |
599 | |
600 >>> ' '.join(remove_duplicates('abcaabbccaaabbbcccbcbc')) | |
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration') | |
Traceback (most recent call last): | |
File "/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py", line 590, in every_other | |
next(items) | |
StopIteration | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run | |
compileflags, 1), test.globs) | |
File "<doctest jaraco.itertools.remove_duplicates[0]>", line 1, in <module> | |
RuntimeError: generator raised StopIteration | |
/Users/jaraco/Dropbox/code/main/jaraco.itertools/jaraco/itertools.py:600: UnexpectedException | |
===================== 5 failed, 27 passed in 0.17 seconds ====================== | |
ERROR: InvocationError: '/Users/jaraco/Dropbox/code/main/jaraco.itertools/.tox/python/bin/py.test' | |
___________________________________ summary ____________________________________ | |
ERROR: python: commands failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment