コード例 #1
0
ファイル: test_tools.py プロジェクト: ParsonsRD/ctapipe
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)
コード例 #2
0
ファイル: test_tools.py プロジェクト: ssteinmassl/ctapipe
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
コード例 #3
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)
コード例 #4
0
ファイル: test_tools.py プロジェクト: kosack/ctapipe
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'])