def test_skip_behaviour_error():
    """An error with skip_behaviour 'exit' should end process
    """

    conf = """
    {"batch": true,
    "skip_behaviour": "exit"}
    """

    out_data = run_tvnamer(
        with_files = ['scrubs.s01e01.avi', 'a.nonsense.fake.episode.s01e01.avi'],
        with_config = conf,
        with_input = "")

    # Files are processed alphabetically, so file starting wiht S is never touched
    expected_files = ['scrubs.s01e01.avi', 'a.nonsense.fake.episode.s01e01.avi']

    verify_out_data(out_data, expected_files, expected_returncode=2)


    out_data = run_tvnamer(
        with_files = ['scrubs.s01e01.avi', 'z.fake.episode.s01e01.avi'],
        with_config = conf,
        with_input = "")

    # Files are processed alphabetically, so file starting wiht S is never touched
    expected_files = ['Scrubs - [01x01] - My First Day.avi', 'z.fake.episode.s01e01.avi']

    verify_out_data(out_data, expected_files, expected_returncode=2)
An error with skip_behaviour 'exit' should end process
    
tests/test_configfunctional.py