def test_single_extension_with_subdirs():
    """Tests one valid extension recursing into sub-dirs
    """

    conf = """
    {"always_rename": true,
    "select_first": true,
    "valid_extensions": ["avi"],
    "recursive": true}
    """

    out_data = run_tvnamer(
        with_files = ['scrubs.s01e01.avi', 'testdir/scrubs.s01e02.mkv', 'testdir/scrubs.s01e04.avi'],
        with_config = conf,
        run_on_directory = True)

    expected_files = [
        'Scrubs - [01x01] - My First Day.avi',
        'testdir/scrubs.s01e02.mkv',
        'testdir/Scrubs - [01x04] - My Old Lady.avi']

    verify_out_data(out_data, expected_files)
Tests one valid extension recursing into sub-dirs
    
tests/test_limit_by_extension.py