@pytest.mark.parametrize('date_str', ['2Q 2005', '2Q-200A', '2Q-200', '22Q2005', '2Q200.', '6Q-20'])
def test_parsers_quarter_invalid(date_str):
    if (date_str == '6Q-20'):
        msg = f'Incorrect quarterly string is given, quarter must be between 1 and 4: {date_str}'
    else:
        msg = f'Unknown datetime string format, unable to parse: {date_str}'
    with pytest.raises(ValueError, match=msg):
        parsing.parse_time_string(date_str)
@pytest.mark.parametrize('date_str', ['2Q 2005', '2Q-200A', '2Q-200', '22Q2005', '2Q200.', '6Q-20'])
def test_parsers_quarter_invalid(date_str):
    if (date_str == '6Q-20'):
        msg = f'Incorrect quarterly string is given, quarter must be between 1 and 4: {date_str}'
    else:
        msg = f'Unknown datetime string format, unable to parse: {date_str}'
    with pytest.raises(ValueError, match=msg):
        parsing.parse_time_string(date_str)