File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ def __getitem__(self, item):
192192 r ._expand_attrs (depth = 1 )
193193 return r
194194
195- def __str__ (self ):
195+ def _show (self ):
196196 tree_repr = self ._tree .show ()
197197 if self ._root_path is None :
198198 return "<%s>\n %s" % (
@@ -205,3 +205,6 @@ def __str__(self):
205205 text (current_path ),
206206 text (tree_repr ),
207207 )
208+
209+ def __str__ (self ):
210+ return self ._show ()
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ class InteractiveTree(TreeBasedObj):
192192
193193 # test representations
194194 self .assertEqual (
195- obj .__str__ (),
195+ obj ._show (),
196196 """<SomeCoolTree>
197197root
198198├── a
@@ -205,7 +205,7 @@ class InteractiveTree(TreeBasedObj):
205205""" ,
206206 )
207207 self .assertEqual (
208- a .__str__ (),
208+ a ._show (),
209209 """<SomeCoolTree subpart: a>
210210a
211211├── a1
@@ -215,7 +215,7 @@ class InteractiveTree(TreeBasedObj):
215215""" ,
216216 )
217217 self .assertEqual (
218- a .a1 .__str__ (),
218+ a .a1 ._show (),
219219 """<SomeCoolTree subpart: a.a1>
220220a1
221221├── a11
You can’t perform that action at this time.
0 commit comments