From 5534af8f4f31df22ca307e3e3faa16487fa3d2d2 Mon Sep 17 00:00:00 2001 From: Zhizhou Yang Date: Wed, 15 Jan 2020 16:25:04 -0800 Subject: crosperf: migration to python 3 This patch migrates crosperf and its utils to python 3. TEST=Passed presubmit check; tested with simple experiment locally. BUG=chromium:1011676 Change-Id: Ib2a9f9c7cf6a1bb1d0b42a1dd3d9e3cbb4d70a36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2003796 Tested-by: Zhizhou Yang Reviewed-by: Mike Frysinger Reviewed-by: Caroline Tice Commit-Queue: Zhizhou Yang Auto-Submit: Zhizhou Yang --- crosperf/benchmark_run_unittest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crosperf/benchmark_run_unittest.py') diff --git a/crosperf/benchmark_run_unittest.py b/crosperf/benchmark_run_unittest.py index 5696c107..4cadc35c 100755 --- a/crosperf/benchmark_run_unittest.py +++ b/crosperf/benchmark_run_unittest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. @@ -9,10 +9,9 @@ from __future__ import print_function -import unittest import inspect - -import mock +import unittest +import unittest.mock as mock import benchmark_run @@ -121,7 +120,7 @@ class BenchmarkRunTest(unittest.TestCase): 'machine_manager', 'logger_to_use', 'log_level', 'share_cache', 'dut_config' ] - arg_spec = inspect.getargspec(benchmark_run.BenchmarkRun.__init__) + arg_spec = inspect.getfullargspec(benchmark_run.BenchmarkRun.__init__) self.assertEqual(len(arg_spec.args), len(args_list)) self.assertEqual(arg_spec.args, args_list) -- cgit v1.2.3