def test_parse_time_string_check_instance_type_raise_exception():
    msg = "Argument 'arg' has incorrect type (expected str, got tuple)"
    with pytest.raises(TypeError, match=re.escape(msg)):
        parse_time_string((1, 2, 3))
    result = parse_time_string('2019')
    expected = (datetime(2019, 1, 1), 'year')
    assert (result == expected)
def test_parse_time_string_check_instance_type_raise_exception():
    msg = "Argument 'arg' has incorrect type (expected str, got tuple)"
    with pytest.raises(TypeError, match=re.escape(msg)):
        parse_time_string((1, 2, 3))
    result = parse_time_string('2019')
    expected = (datetime(2019, 1, 1), 'year')
    assert (result == expected)