浏览代码

depot_tools: Run watchlists tests on Python 3

Bug: 1002209
Change-Id: I64aecc5e06be13237b73ae568a1beae046ba4962
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1925324
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Edward Lemur 5 年之前
父节点
当前提交
589d4563ba
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      tests/watchlists_unittest.py
  2. 3 2
      watchlists.py

+ 1 - 1
tests/watchlists_unittest.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env vpython3
 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 3 - 2
watchlists.py

@@ -121,8 +121,9 @@ class Watchlists(object):
         if name not in self._watchlists:
           continue
         if rule.search(path):
-          map(watchers.add, self._watchlists[name])
-    return list(watchers)
+          for watchlist in self._watchlists[name]:
+            watchers.add(watchlist)
+    return sorted(watchers)
 
 
 def main(argv):