# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..utils import PlotTimeSeries


def test_PlotTimeSeries_inputs():
    input_map = dict(
        args=dict(
            argstr="%s",
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr="%s",
            mandatory=True,
            position=1,
        ),
        labels=dict(
            argstr="%s",
        ),
        legend_file=dict(
            argstr="--legend=%s",
            extensions=None,
        ),
        out_file=dict(
            argstr="-o %s",
            extensions=None,
            genfile=True,
            hash_files=False,
        ),
        output_type=dict(),
        plot_finish=dict(
            argstr="--finish=%d",
            xor=("plot_range",),
        ),
        plot_range=dict(
            argstr="%s",
            xor=("plot_start", "plot_finish"),
        ),
        plot_size=dict(
            argstr="%s",
        ),
        plot_start=dict(
            argstr="--start=%d",
            xor=("plot_range",),
        ),
        sci_notation=dict(
            argstr="--sci",
        ),
        title=dict(
            argstr="%s",
        ),
        x_precision=dict(
            argstr="--precision=%d",
        ),
        x_units=dict(
            argstr="-u %d",
            usedefault=True,
        ),
        y_max=dict(
            argstr="--ymax=%.2f",
            xor=("y_range",),
        ),
        y_min=dict(
            argstr="--ymin=%.2f",
            xor=("y_range",),
        ),
        y_range=dict(
            argstr="%s",
            xor=("y_min", "y_max"),
        ),
    )
    inputs = PlotTimeSeries.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(inputs.traits()[key], metakey) == value


def test_PlotTimeSeries_outputs():
    output_map = dict(
        out_file=dict(
            extensions=None,
        ),
    )
    outputs = PlotTimeSeries.output_spec()

    for key, metadata in list(output_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(outputs.traits()[key], metakey) == value
