def test_tag_setter_wrong_type(mock_repo): """ GIVEN GitRepo is initialized with a path and repo WHEN the tag setter is called with the wrong type THEN a TypeError is raised """ repo = GitRepo('./', mock_repo) with pytest.raises(TypeError): repo.tag = repo
def test_tag_setter(mock_repo): """ GIVEN GitRepo is initialized with a path and repo WHEN the tag setter is called THEN the tag is set as expected """ repo = GitRepo('./', mock_repo) new_tag = GitTag(git_repo=repo, logger=None) repo.tag = new_tag assert repo.tag == new_tag