Created
December 9, 2014 14:56
-
-
Save cdeil/5525c1ee193f1426ee8b to your computer and use it in GitHub Desktop.
This file contains 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
$ python3.4 -m bunch.test | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 50, in bunch.Bunch | |
Failed example: | |
b.keys() | |
Expected: | |
['foo', 'hello'] | |
Got: | |
dict_keys(['foo', 'hello']) | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 56, in bunch.Bunch | |
Failed example: | |
print repr(b) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch[10]>", line 1 | |
print repr(b) | |
^ | |
SyntaxError: invalid syntax | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 61, in bunch.Bunch | |
Failed example: | |
[ (k,b[k]) for k in b ] | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch[11]>", line 1, in <module> | |
[ (k,b[k]) for k in b ] | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 200, in __repr__ | |
keys.sort() | |
AttributeError: 'dict_keys' object has no attribute 'sort' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 156, in bunch.Bunch.__delattr__ | |
Failed example: | |
del b.values | |
Expected: | |
Traceback (most recent call last): | |
... | |
AttributeError: 'Bunch' object attribute 'values' is read-only | |
Got: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.__delattr__[1]>", line 1, in <module> | |
del b.values | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 175, in __delattr__ | |
object.__delattr__(self, k) | |
AttributeError: values | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 192, in bunch.Bunch.__repr__ | |
Failed example: | |
print repr(b) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.__repr__[1]>", line 1 | |
print repr(b) | |
^ | |
SyntaxError: invalid syntax | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 194, in bunch.Bunch.__repr__ | |
Failed example: | |
eval(repr(b)) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.__repr__[2]>", line 1, in <module> | |
eval(repr(b)) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 200, in __repr__ | |
keys.sort() | |
AttributeError: 'dict_keys' object has no attribute 'sort' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 208, in bunch.Bunch.fromDict | |
Failed example: | |
b = Bunch.fromDict({'urmom': {'sez': {'what': 'what'}}}) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.fromDict[0]>", line 1, in <module> | |
b = Bunch.fromDict({'urmom': {'sez': {'what': 'what'}}}) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 214, in fromDict | |
return bunchify(d) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 245, in bunchify | |
return Bunch( (k, bunchify(v)) for k,v in x.iteritems() ) | |
AttributeError: 'dict' object has no attribute 'iteritems' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 209, in bunch.Bunch.fromDict | |
Failed example: | |
b.urmom.sez.what | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.fromDict[1]>", line 1, in <module> | |
b.urmom.sez.what | |
NameError: name 'b' is not defined | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 181, in bunch.Bunch.toDict | |
Failed example: | |
b.toDict() | |
Exception raised: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 116, in __getattr__ | |
return object.__getattribute__(self, k) | |
AttributeError: 'Bunch' object has no attribute 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 119, in __getattr__ | |
return self[k] | |
KeyError: 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.Bunch.toDict[1]>", line 1, in <module> | |
b.toDict() | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 186, in toDict | |
return unbunchify(self) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 270, in unbunchify | |
return dict( (k, unbunchify(v)) for k,v in x.iteritems() ) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 121, in __getattr__ | |
raise AttributeError(k) | |
AttributeError: iteritems | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 228, in bunch.bunchify | |
Failed example: | |
b = bunchify({'urmom': {'sez': {'what': 'what'}}}) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.bunchify[0]>", line 1, in <module> | |
b = bunchify({'urmom': {'sez': {'what': 'what'}}}) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 245, in bunchify | |
return Bunch( (k, bunchify(v)) for k,v in x.iteritems() ) | |
AttributeError: 'dict' object has no attribute 'iteritems' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 229, in bunch.bunchify | |
Failed example: | |
b.urmom.sez.what | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.bunchify[1]>", line 1, in <module> | |
b.urmom.sez.what | |
NameError: name 'b' is not defined | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 235, in bunch.bunchify | |
Failed example: | |
b = bunchify({ 'lol': ('cats', {'hah':'i win again'}), | |
'hello': [{'french':'salut', 'german':'hallo'}] }) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.bunchify[2]>", line 2, in <module> | |
'hello': [{'french':'salut', 'german':'hallo'}] }) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 245, in bunchify | |
return Bunch( (k, bunchify(v)) for k,v in x.iteritems() ) | |
AttributeError: 'dict' object has no attribute 'iteritems' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 237, in bunch.bunchify | |
Failed example: | |
b.hello[0].french | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.bunchify[3]>", line 1, in <module> | |
b.hello[0].french | |
NameError: name 'b' is not defined | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 239, in bunch.bunchify | |
Failed example: | |
b.lol[1].hah | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.bunchify[4]>", line 1, in <module> | |
b.lol[1].hah | |
NameError: name 'b' is not defined | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 313, in bunch.from_yaml | |
Failed example: | |
yaml.load(''' | |
Flow style: !bunch.Bunch { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki } | |
Block style: !bunch | |
Clark : Evans | |
Brian : Ingerson | |
Oren : Ben-Kiki | |
''') #doctest: +NORMALIZE_WHITESPACE | |
Exception raised: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.from_yaml[1]>", line 7, in <module> | |
''') #doctest: +NORMALIZE_WHITESPACE | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 200, in __repr__ | |
keys.sort() | |
AttributeError: 'dict_keys' object has no attribute 'sort' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 289, in bunch.toJSON | |
Failed example: | |
json.dumps(b) | |
Expected: | |
'{"ponies": "are pretty!", "foo": {"lol": true}, "hello": 42}' | |
Got: | |
'{"ponies": "are pretty!", "hello": 42, "foo": {"lol": true}}' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 291, in bunch.toJSON | |
Failed example: | |
b.toJSON() | |
Expected: | |
'{"ponies": "are pretty!", "foo": {"lol": true}, "hello": 42}' | |
Got: | |
'{"ponies": "are pretty!", "hello": 42, "foo": {"lol": true}}' | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 255, in bunch.unbunchify | |
Failed example: | |
unbunchify(b) | |
Exception raised: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 116, in __getattr__ | |
return object.__getattribute__(self, k) | |
AttributeError: 'Bunch' object has no attribute 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 119, in __getattr__ | |
return self[k] | |
KeyError: 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.unbunchify[1]>", line 1, in <module> | |
unbunchify(b) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 270, in unbunchify | |
return dict( (k, unbunchify(v)) for k,v in x.iteritems() ) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 121, in __getattr__ | |
raise AttributeError(k) | |
AttributeError: iteritems | |
********************************************************************** | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 263, in bunch.unbunchify | |
Failed example: | |
unbunchify(b) #doctest: +NORMALIZE_WHITESPACE | |
Exception raised: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 116, in __getattr__ | |
return object.__getattribute__(self, k) | |
AttributeError: 'Bunch' object has no attribute 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 119, in __getattr__ | |
return self[k] | |
KeyError: 'iteritems' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/doctest.py", line 1324, in __run | |
compileflags, 1), test.globs) | |
File "<doctest bunch.unbunchify[3]>", line 1, in <module> | |
unbunchify(b) #doctest: +NORMALIZE_WHITESPACE | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 270, in unbunchify | |
return dict( (k, unbunchify(v)) for k,v in x.iteritems() ) | |
File "/Users/deil/Library/Python/3.4/lib/python/site-packages/bunch/__init__.py", line 121, in __getattr__ | |
raise AttributeError(k) | |
AttributeError: iteritems | |
********************************************************************** | |
9 items had failures: | |
3 of 13 in bunch.Bunch | |
1 of 4 in bunch.Bunch.__delattr__ | |
2 of 3 in bunch.Bunch.__repr__ | |
2 of 2 in bunch.Bunch.fromDict | |
1 of 2 in bunch.Bunch.toDict | |
5 of 5 in bunch.bunchify | |
1 of 2 in bunch.from_yaml | |
2 of 3 in bunch.toJSON | |
2 of 4 in bunch.unbunchify | |
***Test Failed*** 19 failures. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment