[sabayon] Clean up obviously broken test cases
- From: Scott Balneaves <sbalneav src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sabayon] Clean up obviously broken test cases
- Date: Wed, 24 Feb 2010 02:57:16 +0000 (UTC)
commit d3561b8ab71dc064289891a52c531b2962a89d6b
Author: Scott Balneaves <sbalneav ltsp org>
Date: Tue Feb 23 20:57:21 2010 -0600
Clean up obviously broken test cases
lib/mozilla_bookmarks.py | 35 +++--------------------------------
1 files changed, 3 insertions(+), 32 deletions(-)
---
diff --git a/lib/mozilla_bookmarks.py b/lib/mozilla_bookmarks.py
index d96eeb2..e75e2bd 100755
--- a/lib/mozilla_bookmarks.py
+++ b/lib/mozilla_bookmarks.py
@@ -98,7 +98,7 @@ class Bookmark:
return join.join(path)
def path_as_string(self):
- return self.path_as_names(bookmark_separator)
+ return self.path_as_names(bookmark_separator)
class BookmarkFolder:
def __init__(self, name, parent):
@@ -208,7 +208,7 @@ class BookmarkFolder:
return join.join(path)
def path_as_string(self):
- return self.path_as_names(bookmark_separator)
+ return self.path_as_names(bookmark_separator)
def _traverse(self, visit_func, path, data):
assert isinstance(self, BookmarkFolder)
@@ -397,39 +397,10 @@ def visit(entry, type, path, data=None):
# -----------------------
if __name__ == "__main__":
- bm_root = []
+ bm_root = BookmarkFolder('bm', None)
bm_file = BookmarkHTMLParser()
bm_file.set_root(bm_root)
bm_file.feed(open('bookmarks.html').read())
bm_file.close()
- bm_root_1 = []
- bm_file_1 = BookmarkHTMLParser(bm_root_1)
- bm_file_1.feed(open('bookmarks1.html').read())
- bm_file_1.close()
-
- if False:
- bm_name = "libical"
- bm_list = bm_file.folder_root.find_bookmark(bm_name)
- if bm_list:
- for bm in bm_list:
- print "found bookmark %s url=%s" % (bm.name, bm.get_attr("href"))
- print "path = %s" % bm.path_as_string()
- else:
- print "%s not found" % bm_name
-
- if False:
- bm_file.folder_root.traverse(visit)
-
- if True:
- bm_dict = bm_file.folder_root.convert_to_dict()
- bm_dict_1 = bm_file_1.folder_root.convert_to_dict()
-
- dc = util.DictCompare(bm_dict, bm_dict_1)
- dc.compare()
- cs = dc.get_change_set('a', 'b')
- util.dump_change_set(cs)
-
- if False:
- bm_file.folder_root.write("tmp_bookmarks.html", exclude_attrs=bm_file.bookmark_exclude_attrs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]