def test_extract_charge_resolution(tmpdir): output_path = os.path.join(str(tmpdir), "cr.h5") tool = ChargeResolutionGenerator() with pytest.raises(KeyError): tool.run([ '-f', get_dataset_path("gamma_test_large.simtel.gz"), '-o', output_path, ])
def test_extract_charge_resolution(tmpdir): from ctapipe.tools.extract_charge_resolution import ( ChargeResolutionGenerator ) output_path = os.path.join(str(tmpdir), "cr.h5") tool = ChargeResolutionGenerator() with pytest.raises(KeyError): tool.run([ '-f', get_dataset_path("gamma_test_large.simtel.gz"), '-o', output_path, ])
def test_extract_charge_resolution(tmpdir): from ctapipe.tools.extract_charge_resolution import ( ChargeResolutionGenerator) output_path = os.path.join(str(tmpdir), "cr.h5") tool = ChargeResolutionGenerator() with pytest.raises(KeyError): tool.run([ '-f', GAMMA_TEST_LARGE, '-o', output_path, ])
def test_extract_charge_resolution(tmpdir): from ctapipe.tools.extract_charge_resolution import ( ChargeResolutionGenerator ) output_path = os.path.join(str(tmpdir), "cr.h5") tool = ChargeResolutionGenerator() with pytest.raises(KeyError): tool.run([ '-f', GAMMA_TEST_LARGE, '-O', output_path, ]) # TODO: Test files do not contain true charge, cannot test tool fully # assert os.path.exists(output_path) with pytest.raises(SystemExit): tool.run(['--help-all'])
def test_extract_charge_resolution(tmpdir): from ctapipe.tools.extract_charge_resolution import ChargeResolutionGenerator output_path = os.path.join(str(tmpdir), "cr.h5") tool = ChargeResolutionGenerator() assert run_tool(tool, ["-f", GAMMA_TEST_LARGE, "-O", output_path]) == 1 # TODO: Test files do not contain true charge, cannot test tool fully # assert os.path.exists(output_path) assert run_tool(tool, ["--help-all"]) == 0