def test_json_file(self): with tests.temporary_directory() as tmpdir: filename = os.path.join(tmpdir, 'test.json') result = self.run_text_runner('--worker', '--output', filename) loaded = perf.Benchmark.load(filename) tests.compare_benchmarks(self, loaded, result.bench)
def test_json_file(self): with tests.temporary_directory() as tmpdir: filename = os.path.join(tmpdir, 'test.json') result = self.exec_runner('--worker', '--output', filename) loaded = perf.Benchmark.load(filename) tests.compare_benchmarks(self, loaded, result.bench)
def test_convert(self): bench = perf.Benchmark.load(TELCO) with tests.temporary_directory() as tmpdir: filename = os.path.join(tmpdir, 'test.json') self.run_command('convert', TELCO, '-o', filename) bench2 = perf.Benchmark.load(filename) tests.compare_benchmarks(self, bench2, bench)