Skip to content

Commit

Permalink
testing: support python3 in headless_python_unittests.py
Browse files Browse the repository at this point in the history
Bug: 1340449
Change-Id: I364fce6f0b86f0129e8f9e94de744c59dea115ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3734707
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1019917}
  • Loading branch information
Takuto Ikuta authored and Chromium LUCI CQ committed Jul 1, 2022
1 parent 2bfb155 commit d0a8c00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
Expand All @@ -15,7 +15,7 @@ class ClientApiGeneratorTest(unittest.TestCase):

def test_ArgumentParsing(self):
with tempfile.NamedTemporaryFile() as f:
f.write('{"foo": true}')
f.write(b'{"foo": true}')
f.flush()
json_api, output_dir = client_api_generator.ParseArguments([
'--protocol', f.name, '--output_dir', 'out'])
Expand Down
4 changes: 2 additions & 2 deletions testing/scripts/headless_python_unittests.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython3
# Copyright 2016 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.
Expand Down Expand Up @@ -38,7 +38,7 @@ def main_run(args):
valid = bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
((rc == 0) or failures))
common.record_local_script_results(
'headless_python_unittests', args.output, failures.keys(), valid)
'headless_python_unittests', args.output, list(failures.keys()), valid)

return rc

Expand Down

0 comments on commit d0a8c00

Please sign in to comment.