Commit Graph

6 Commits (chrome/3987)

Author SHA1 Message Date
Marc-Antoine Ruel 8e57b4bc55 python3 improvements
Ran:
  vi $(git grep --name-only iteritems | grep -v third_party)
  vi $(git grep --name-only itervalues | grep -v third_party)
  vi $(git grep --name-only 'print ' | grep -v third_party)

and edited the files quickly with adhoc macros. Then ran in recipes/:
  ./recipes.py test train

There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.

Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
5 years ago
Marc-Antoine Ruel bdce6c8361 Fix auto_stub.py for skipped tests.
This is blocking a luci roll in infra.

R=nodir@chromium.org

Change-Id: I996a74ba519cf05f72d430ca4a2e63e76436b509
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1598469
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
6 years ago
maruel@chromium.org 7861ac1c2b Reduce auto_stub.py by removing python 2.6 support code.
This makes this file even easier to read and python 2.6 support is not needed
anymore.

R=iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/238233002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265799 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 6b4a65456a Rename assertEquals to assertEqual in auto_stub.py.
assertEquals is deprecated.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14602008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@199316 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 6d2d7217e8 Fix small error in SimpleMock.
It's bad python practice to use a class-level member that is mutable. self.calls
is already initialized in __init__ so it's not useful (and dangerous) to have it
as a class member.

R=cmp@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/11801018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175368 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 7bb06bbaa8 Move auto_stub.py from commit-queue
Use it in subprocess2 and trial_dir to remove manually bookeeping.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8688011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@111941 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago