diff options
Diffstat (limited to 'crosperf/experiment_runner_unittest.py')
-rwxr-xr-x | crosperf/experiment_runner_unittest.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crosperf/experiment_runner_unittest.py b/crosperf/experiment_runner_unittest.py index 0bbab292..31d02e71 100755 --- a/crosperf/experiment_runner_unittest.py +++ b/crosperf/experiment_runner_unittest.py @@ -409,11 +409,11 @@ class ExperimentRunnerTest(unittest.TestCase): @mock.patch.object(Result, 'CompressResultsTo') @mock.patch.object(Result, 'CopyResultsTo') @mock.patch.object(Result, 'CleanUp') - @mock.patch.object(Result, 'FormatStringTop5') + @mock.patch.object(Result, 'FormatStringTopCommands') @mock.patch('builtins.open', new_callable=mock.mock_open) - def test_store_results(self, mock_open, mock_top5, mock_cleanup, mock_copy, - mock_compress, _mock_text_report, mock_report, - mock_writefile, mock_mkdir, mock_rmdir): + def test_store_results(self, mock_open, mock_top_commands, mock_cleanup, + mock_copy, mock_compress, _mock_text_report, + mock_report, mock_writefile, mock_mkdir, mock_rmdir): self.mock_logger.Reset() self.exp.results_directory = '/usr/local/crosperf-results' @@ -441,7 +441,7 @@ class ExperimentRunnerTest(unittest.TestCase): self.assertEqual(mock_rmdir.call_count, 0) self.assertEqual(self.mock_logger.LogOutputCount, 0) self.assertEqual(mock_open.call_count, 0) - self.assertEqual(mock_top5.call_count, 0) + self.assertEqual(mock_top_commands.call_count, 0) # Test 2. _terminated is false; everything works properly. fake_result = Result(self.mock_logger, self.exp.labels[0], 'average', @@ -470,7 +470,7 @@ class ExperimentRunnerTest(unittest.TestCase): self.assertEqual(self.mock_logger.LogOutputCount, 5) self.assertEqual(self.mock_logger.output_msgs, [ 'Storing experiment file in /usr/local/crosperf-results.', - 'Storing top5 statistics of each benchmark run into' + 'Storing top statistics of each benchmark run into' ' /usr/local/crosperf-results/topstats.log.', 'Storing results of each benchmark run.', 'Storing results report in /usr/local/crosperf-results.', @@ -482,9 +482,9 @@ class ExperimentRunnerTest(unittest.TestCase): 'w') mock_open().write.assert_called() - # Check top5 calls with no arguments. - top5calls = [mock.call()] * 6 - self.assertEqual(mock_top5.call_args_list, top5calls) + # Check top calls with no arguments. + topcalls = [mock.call()] * 6 + self.assertEqual(mock_top_commands.call_args_list, topcalls) # Test 3. Test compress_results. self.exp.compress_results = True |