Commit 33bf4c4b authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

[test] Clean up Py2 code

Bug: chromium:1292013
Change-Id: If50c18249afe8b75154d4b111485280d158a5582
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525137Reviewed-by: 's avatarLiviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79506}
parent 2c4133a0
...@@ -35,10 +35,6 @@ from testrunner.local import testsuite ...@@ -35,10 +35,6 @@ from testrunner.local import testsuite
from testrunner.objects import testcase from testrunner.objects import testcase
from testrunner.outproc import base as outproc from testrunner.outproc import base as outproc
try:
basestring # Python 2
except NameError: # Python 3
basestring = str
FILES_PATTERN = re.compile(r"//\s+Files:(.*)") FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
ENV_PATTERN = re.compile(r"//\s+Environment Variables:(.*)") ENV_PATTERN = re.compile(r"//\s+Environment Variables:(.*)")
...@@ -249,7 +245,7 @@ class CombinedTest(testcase.D8TestCase): ...@@ -249,7 +245,7 @@ class CombinedTest(testcase.D8TestCase):
def _is_flag_blocked(self, flag): def _is_flag_blocked(self, flag):
for item in MISBEHAVING_COMBINED_TESTS_FLAGS: for item in MISBEHAVING_COMBINED_TESTS_FLAGS:
if isinstance(item, basestring): if isinstance(item, str):
if item == flag: if item == flag:
return True return True
elif item.match(flag): elif item.match(flag):
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# for py2/py3 compatibility
from functools import reduce from functools import reduce
import os import os
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# for py2/py3 compatibility
from __future__ import print_function
import imp import imp
import itertools import itertools
import os import os
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# for py2/py3 compatibility
from __future__ import print_function
import os import os
from testrunner.local import command from testrunner.local import command
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# for py2/py3 compatibility
from __future__ import print_function
import os import os
from testrunner.local import command from testrunner.local import command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment