示例#1
0
    def test_benchmark_start(self, check_output, exists):

        exists.return_value = True
        check_output.return_value = "data"

        with patch_open() as (_open, _file):
            self.assertIsNone(Benchmark.start())
            # _open.assert_called_with('/etc/benchmark.conf', 'w')

        COLLECT_PROFILE_DATA = '/usr/local/bin/collect-profile-data'
        exists.assert_any_call(COLLECT_PROFILE_DATA)
        check_output.assert_any_call([COLLECT_PROFILE_DATA])
示例#2
0
def start():
    Benchmark.start()