@parameterized.expand([('alt1:alt2:alt3:dataset.table', None, 'Use either : or . to specify project got {}'), ('alt1.alt.dataset.table', None, 'Expect format of \\(<project\\.\\|<project\\:\\)<dataset>\\.<table>, got {}'), ('alt1:alt2:alt.dataset.table', 'var_x', 'Format exception for var_x: Use either : or . to specify project got {}'), ('alt1:alt2:alt:dataset.table', 'var_x', 'Format exception for var_x: Use either : or . to specify project got {}'), ('alt1.alt.dataset.table', 'var_x', 'Format exception for var_x: Expect format of \\(<project\\.\\|<project:\\)<dataset>.<table>, got {}')])
def test_invalid_syntax(self, table_input, var_name, exception_message):
    default_project_id = 'project'
    with pytest.raises(Exception, match=exception_message.format(table_input)):
        _split_tablename(table_input, default_project_id, var_name)
@parameterized.expand([('alt1:alt2:alt3:dataset.table', None, 'Use either : or . to specify project got {}'), ('alt1.alt.dataset.table', None, 'Expect format of \\(<project\\.\\|<project\\:\\)<dataset>\\.<table>, got {}'), ('alt1:alt2:alt.dataset.table', 'var_x', 'Format exception for var_x: Use either : or . to specify project got {}'), ('alt1:alt2:alt:dataset.table', 'var_x', 'Format exception for var_x: Use either : or . to specify project got {}'), ('alt1.alt.dataset.table', 'var_x', 'Format exception for var_x: Expect format of \\(<project\\.\\|<project:\\)<dataset>.<table>, got {}')])
def test_invalid_syntax(self, table_input, var_name, exception_message):
    default_project_id = 'project'
    with pytest.raises(Exception, match=exception_message.format(table_input)):
        _split_tablename(table_input, default_project_id, var_name)