ch17: update from book draft

This commit is contained in:
Luciano Ramalho committed 2020-02-18 23:45:05 -03:00
1 parent 70650841b3
commit aa868e8f75
35 files changed
+788 -31

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
from tree import tree
def test_1_level():
class One: pass
expected = ['One']
result = list(tree(One))
assert expected == result
+7
View File
@@ -0,0 +1,7 @@
def tree(cls):
yield cls.__name__
if __name__ == '__main__':
for cls_name in tree(BaseException):
print(cls_name)