diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-05 21:28:40 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-05 21:28:40 +0000 |
commit | cddd960b0ba2eb62c372c0d3176c75f0bd05d5e8 (patch) | |
tree | f592e7ccc058bdd6c0beda99a104df4f73c5e1d3 /crosperf/results_report_unittest.py | |
parent | 81bca172159b02808081a57062a1c61ee9c54d76 (diff) | |
parent | 3c0fcaf157c060979b09c0d8e7a982ff5d1acdab (diff) | |
download | toolchain-utils-cddd960b0ba2eb62c372c0d3176c75f0bd05d5e8.tar.gz |
Merging 8 commit(s) from Chromium's toolchain-utils am: 928fba9d74 am: cfb8763e2b am: 3c0fcaf157
Change-Id: Ie5c5dbcb6f4cfb497c32c3c73466e844ebf1dd6c
Diffstat (limited to 'crosperf/results_report_unittest.py')
-rwxr-xr-x | crosperf/results_report_unittest.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crosperf/results_report_unittest.py b/crosperf/results_report_unittest.py index dfcce725..e03ea431 100755 --- a/crosperf/results_report_unittest.py +++ b/crosperf/results_report_unittest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2016 The Chromium OS Authors. All rights reserved. @@ -14,8 +14,8 @@ import collections import io import os import unittest +import unittest.mock as mock -import mock import test_flag from benchmark_run import MockBenchmarkRun @@ -83,7 +83,7 @@ def FakePath(ext): def MakeMockExperiment(compiler='gcc'): """Mocks an experiment using the given compiler.""" - mock_experiment_file = io.BytesIO(""" + mock_experiment_file = io.StringIO(""" board: x86-alex remote: 127.0.0.1 locks_dir: /tmp @@ -312,7 +312,7 @@ class JSONResultsReportTest(unittest.TestCase): # Nothing succeeded; we don't send anything more than what's required. required_keys = self._GetRequiredKeys(is_experiment=True) for result in results: - self.assertItemsEqual(result.iterkeys(), required_keys) + self.assertCountEqual(result.keys(), required_keys) def testJSONReportOutputWithSuccesses(self): success_keyvals = { @@ -429,7 +429,7 @@ class PerfReportParserTest(unittest.TestCase): def testParserParsesRealWorldPerfReport(self): report = ParseStandardPerfReport(self._ReadRealPerfReport()) - self.assertItemsEqual(['cycles', 'instructions'], sorted(report.keys())) + self.assertCountEqual(['cycles', 'instructions'], list(report.keys())) # Arbitrarily selected known percentages from the perf report. known_cycles_percentages = { |