def test_find_previous_tag_errors_3(git_repo, tags=[]): with pytest.raises(ValueError): filter.find_previous_tag('docker-plugin-1.1.1', tags, None, git_repo)
def test_find_find_previous_tag_errors(tag, error, tags, git_repo): with pytest.raises(error): filter.find_previous_tag(tag, tags, None, git_repo)
def test_find_previous_tag_errors_2(tags, git_repo='no-git-repo'): with pytest.raises(TypeError): filter.find_previous_tag('docker-plugin-1.1.1', tags, None, git_repo)
def test_find_previous_tag(previous_tag, tag, tags, git_repo): assert filter.find_previous_tag(tag, tags, None, git_repo) == previous_tag