def test_plot_charge_resolution(tmpdir): from ctapipe.plotting.tests.test_charge_resolution import \ create_temp_cr_file path = create_temp_cr_file(tmpdir) output_path = os.path.join(str(tmpdir), "cr.pdf") tool = ChargeResolutionViewer() tool.run([ '-f', [path], '-o', output_path, ]) assert os.path.exists(output_path)
def test_plot_charge_resolution(tmpdir): from ctapipe.tools.plot_charge_resolution import ChargeResolutionViewer from ctapipe.plotting.tests.test_charge_resolution import create_temp_cr_file path = create_temp_cr_file(tmpdir) output_path = os.path.join(str(tmpdir), "cr.pdf") tool = ChargeResolutionViewer() assert run_tool(tool, ["-f", [path], "-o", output_path]) == 0 assert os.path.exists(output_path) assert run_tool(tool, ["--help-all"]) == 0
def test_plot_charge_resolution(tmpdir): from ctapipe.tools.plot_charge_resolution import ChargeResolutionViewer from ctapipe.plotting.tests.test_charge_resolution import \ create_temp_cr_file path = create_temp_cr_file(tmpdir) output_path = os.path.join(str(tmpdir), "cr.pdf") tool = ChargeResolutionViewer() tool.run([ '-f', [path], '-o', output_path, ]) assert os.path.exists(output_path)
def test_plot_charge_resolution(tmpdir): from ctapipe.tools.plot_charge_resolution import ChargeResolutionViewer from ctapipe.plotting.tests.test_charge_resolution import \ create_temp_cr_file path = create_temp_cr_file(tmpdir) output_path = os.path.join(str(tmpdir), "cr.pdf") tool = ChargeResolutionViewer() tool.run([ '-f', [path], '-o', output_path, ]) assert os.path.exists(output_path) with pytest.raises(SystemExit): tool.run(['--help-all'])