diff options
author | Emma Foley <emma.l.foley@intel.com> | 2018-03-12 15:07:59 +0000 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-06-13 18:37:41 +0000 |
commit | 55d59992c6695e2ba4093b1d76905f3263dfba3e (patch) | |
tree | e9aa2e5f71fb9fe99e02d7c6066997efc044ad0d /yardstick/tests/unit/benchmark/runner | |
parent | a3399d07b83ce0e50d9c0144d00a7ba83a73390f (diff) |
assert[Greater,Equal] -> assert_{,not_}called
assertEqual(mock_xxx.call_count, 1) -> mock_xxx.assert_called_once
assertEqual(mock_xxx.call_count, 0) -> mock_xxx.assert_not_called
assertGreater(mock.call_count, 0) -> mock.assert_called()
assertGreaterEqual(mock.call_count, 1) -> mock.assert_called()
JIRA: YARDSTICK-1069
Change-Id: I890084d120c8e78304e169e2a0e5d30011a41525
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/runner')
-rw-r--r-- | yardstick/tests/unit/benchmark/runner/test_search.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/tests/unit/benchmark/runner/test_search.py b/yardstick/tests/unit/benchmark/runner/test_search.py index 4e5b4fe77..00a241c7c 100644 --- a/yardstick/tests/unit/benchmark/runner/test_search.py +++ b/yardstick/tests/unit/benchmark/runner/test_search.py @@ -38,7 +38,7 @@ class TestSearchRunnerHelper(unittest.TestCase): with helper.get_benchmark_instance(): helper() - self.assertEqual(method.call_count, 1) + method.assert_called_once() def test___call___error(self): cls = mock.MagicMock() @@ -199,4 +199,4 @@ class TestSearchRunner(unittest.TestCase): runner = SearchRunner({}) runner._run_benchmark(cls, 'my_method', scenario_cfg, {}) - self.assertEqual(mock_multi_process.Process.call_count, 1) + mock_multi_process.Process.assert_called_once() |