ch11-24: clean up by @eumiro & sync with Atlas
This commit is contained in:
1 parent
03ace4f4ae
commit
47cafc801a
143 files changed
+21692
-63
No files matched your search
@@ -0,0 +1,8 @@
|
||||
from tree import tree
|
||||
|
||||
|
||||
def test_1_level():
|
||||
class One: pass
|
||||
expected = ['One']
|
||||
result = list(tree(One))
|
||||
assert expected == result
|
||||
@@ -0,0 +1,11 @@
|
||||
def tree(cls):
|
||||
yield cls.__name__
|
||||
|
||||
|
||||
def display(cls):
|
||||
for cls_name in tree(cls):
|
||||
print(cls_name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
display(BaseException)
|
||||
Reference in new issue
Block a user