From afb5f0e3d3723086856c5cc03c409abafdb62b0d Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Fri, 28 Apr 2023 22:13:54 +0000 Subject: [PATCH] Drop explicit PRESUBMIT py2 test R=gavinmak@google.com Bug: 1376538 Change-Id: Ie5d1fbc2e7da1625f78016bb5d10e36d15ceb128 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4491463 Commit-Queue: Josip Sokcevic Reviewed-by: Gavin Mak --- tests/PRESUBMIT.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 tests/PRESUBMIT.py diff --git a/tests/PRESUBMIT.py b/tests/PRESUBMIT.py deleted file mode 100644 index 5c0a3bd4b..000000000 --- a/tests/PRESUBMIT.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2021 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. - -import sys - -PRESUBMIT_VERSION = '2.0.0' - -# This file can be removed once py2 presubmit is no longer supported. This is -# an integration test to ensure py2 presubmit still works. - - -def CheckPythonVersion(input_api, output_api): - # The tests here are assuming this is not defined, so raise an error - # if it is. - if 'USE_PYTHON3' in globals(): - return [ - output_api.PresubmitError( - 'USE_PYTHON3 is defined; update the tests in //PRESUBMIT.py and ' - '//tests/PRESUBMIT.py.') - ] - if sys.version_info.major != 2: - return [ - output_api.PresubmitError( - 'Did not use Python2 for //PRESUBMIT.py by default.') - ] - return []