Migrate PRESUBMIT_test.py to Python 3. Bug: pdfium:1674 Change-Id: Icb4c9148589f67771cd852413c8da105d991faab Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86372 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py index 925db9b..cbe87d7 100755 --- a/PRESUBMIT_test.py +++ b/PRESUBMIT_test.py
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2020 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. @@ -32,8 +32,8 @@ mock_input_api = MockInputApi() mock_output_api = MockOutputApi() mock_input_api.files = map(MockFile, correct_paths + wrong_paths) - errors = map(str, PRESUBMIT._CheckPNGFormat(mock_input_api, - mock_output_api)) + errors = list( + map(str, PRESUBMIT._CheckPNGFormat(mock_input_api, mock_output_api))) self.assertEqual(len(wrong_paths), len(errors)) self.assertFalse('notpng.cc' in errors[0])