From 182ab55e1e68d86b6bea4d875c471d8d512d64de Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 2 Oct 2014 21:52:34 -0400 Subject: [PATCH] Elminate invalid jstree examples that are causing doctest failures. --- lib/galaxy/util/jstree.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/lib/galaxy/util/jstree.py b/lib/galaxy/util/jstree.py index 8472ba7d1c0..217e48c4e03 100644 --- a/lib/galaxy/util/jstree.py +++ b/lib/galaxy/util/jstree.py @@ -113,12 +113,6 @@ class JSTree(dictobj.DictionaryObject): kwargs may be standard jsTree options used at all levels in the tree. These will be outputted in the JSON. - Example (basic usage): - >>> import jstree - >>> paths = [jstree.Path("editor/2012-07/31/.classpath", 1), jstree.Path("editor/2012-07/31/.project", 2)] - >>> t1 = jstree.JSTree(paths) - >>> print t1.jsonData() - [{'text': 'editor/2012-07/31/.classpath', 'id': 1, 'li_attr': {'id': 1}}, {'text': 'editor/2012-07/31/.project', 'id': 2, 'li_attr': {'id': 2}}] """ if len(filter(lambda p: not isinstance(p, Path), paths)): raise TypeError( @@ -148,17 +142,6 @@ class JSTree(dictobj.DictionaryObject): """ Create a "pretty print" represenation of the tree with customized indentation at each level of the tree. - - Example: - >>> import jstree - >>> paths = [jstree.Path("editor/2012-07/31/.classpath", 1), jstree.Path("editor/2012-07/31/.project", 2)] - >>> print jstree.JSTree(paths).pretty() - / - editor/ - 2012-07/ - 31/ - .classpath - .project """ if root is None: root = self._root @@ -175,18 +158,5 @@ class JSTree(dictobj.DictionaryObject): ready for consumption by jsTree. The data is represented as a list of dictionaries, each of which are our internal nodes. - Examples: - >>> import jstree - >>> paths = [jstree.Path("editor/2012-07/31/.classpath", 1), jstree.Path("editor/2012-07/31/.project", 2)] - >>> t = jstree.JSTree(paths) - >>> d = t.jsonData() - >>> print d - [{'data': 'editor', 'children': [{'data': '2012-07', 'children': [{'data': '31', 'children': [{'data': '.classpath', 'metadata': {'id': 1}}, {'data': '.project', 'metadata': {'id': 2}}]}]}]}] - >>> print d[0]['children'][0]['children'][0]['children'][1] - {'data': '.project', 'metadata': {'id': 2}} - >>> print d[0]['children'][0]['children'][0]['children'][1]['data'] - .project - >>> print d[0]['children'][0]['children'][0]['children'][1]['metadata']['id'] - 2 """ return [self._root.children[k].jsonData() for k in sorted(self._root.children)]