""" Test ``yatsm line``
"""
import os

from click.testing import CliRunner
import matplotlib as mpl
import pytest

from yatsm.cli.main import cli

mpl_skip = pytest.mark.skipif(
    mpl.get_backend() != 'agg' and "DISPLAY" not in os.environ,
    reason='Requires either matplotlib "agg" backend or that DISPLAY" is set')


@mpl_skip
def test_cli_pixel_pass_1(example_timeseries):
    """ Correctly run for one pixel
    """
    runner = CliRunner()
    result = runner.invoke(
        cli,
        ['-v', 'pixel',
         '--band', '5',
         '--plot', 'TS',
         '--style', 'ggplot',
         example_timeseries['config'], '1', '1'
         ])
    assert result.exit_code == 0

@@ -679,8 +679,419 @@
 de == 0%0A
+%0A%0A@mpl_skip%0Adef test_cli_pixel_pass_2(example_timeseries):%0A    %22%22%22 Correctly run for one pixel for 3 plots%0A    %22%22%22%0A    runner = CliRunner()%0A    result = runner.invoke(%0A        cli,%0A        %5B'-v', 'pixel',%0A         '--band', '5',%0A         '--plot', 'TS', '--plot', 'DOY', '--plot', 'VAL',%0A         '--style', 'ggplot',%0A         example_timeseries%5B'config'%5D, '1', '1'%0A         %5D)%0A    assert result.exit_code == 0%0A

Add test for all plot types