-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# pylint: disable=unused-variable | ||
from typing import Callable, Tuple | ||
|
||
import git | ||
import pytest | ||
|
||
from gto.constants import Action | ||
from gto.exceptions import RefNotFound, TagExists | ||
from gto.tag import ActionSign, create_tag, name_tag, parse_name | ||
from gto.tag import ActionSign, create_tag, find, name_tag, parse_name | ||
|
||
|
||
def test_name_tag(empty_git_repo): | ||
|
@@ -76,3 +79,9 @@ def test_create_tag_repeated_tagname(repo_with_commit): | |
create_tag(repo, "name", ref="HEAD", message="msg") | ||
with pytest.raises(TagExists): | ||
create_tag(repo, "name", ref="HEAD", message="msg") | ||
|
||
|
||
def test_lightweight_tag(repo_with_commit: Tuple[git.Repo, Callable]): | ||
repo, _ = repo_with_commit | ||
repo.create_tag("[email protected]") | ||
assert find(repo=repo) == [] |