test list: remove "DescribeTestLists"
This function is now basically:
(lambda test_lists: "%r" % sorted(test_lists.keys()))
which can be done by the caller itself.
BUG=chromium:758115
TEST=None
Change-Id: Iff1daa3dbd349fbc9e85d1cf15368bc0486b6bf3
Reviewed-on: https://chromium-review.googlesource.com/688936
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/goofy/goofy.py b/py/goofy/goofy.py
index a96e945..6e8bff3 100755
--- a/py/goofy/goofy.py
+++ b/py/goofy/goofy.py
@@ -860,8 +860,8 @@
return self.test_lists[test_list_id]
except KeyError:
raise test_lists.TestListError(
- '%r is not a valid test list ID (available IDs are [%s])' % (
- test_list_id, ', '.join(sorted(self.test_lists.keys()))))
+ '%r is not a valid test list ID (available IDs are %r)' % (
+ test_list_id, sorted(self.test_lists.keys())))
def _RecordStartError(self, error_message):
"""Appends the startup error message into the shared data."""
@@ -880,8 +880,7 @@
self.test_lists, failed_files = self.test_list_manager.BuildAllTestLists()
- logging.info('Loaded test lists: [%s]',
- test_lists.DescribeTestLists(self.test_lists))
+ logging.info('Loaded test lists: %r', sorted(self.test_lists.keys()))
# Check for any syntax errors in test list files.
if failed_files:
diff --git a/py/test/test_lists/test_lists.py b/py/test/test_lists/test_lists.py
index 5f4bcb7..550aafa 100644
--- a/py/test/test_lists/test_lists.py
+++ b/py/test/test_lists/test_lists.py
@@ -282,19 +282,3 @@
finally:
popped = builder_state.stack.pop()
assert test_list == popped
-
-
-def DescribeTestLists(test_lists):
- """Returns a friendly description of a dict of test_lists.
-
- Args:
- test_lists: A dict of test_list_id->test_lists (as returned by
- BuildAllTestLists)
-
- Returns:
- A string like "bar, foo (old-style), main".
- """
- ret = []
- for k in sorted(test_lists.keys()):
- ret.append(k)
- return ', '.join(ret)