Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_latest_tag_or_mod_commit(git_repo):
open('tag-mod.txt', "w").close()
git_repo.index.add("tag-mod.txt")
tag_commit = git_repo.index.commit("tag commit")
git_repo.create_tag("1.0.0", message="1.0.0")
open('post-tag-mod.txt', "w").close()
git_repo.index.add("post-tag-mod.txt")
post_tag_commit = git_repo.index.commit("post tag commit")
assert latest_tag_or_mod_commit("chartpress.yaml") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("tag-mod.txt") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]
def test_latest_tag_or_mod_commit(git_repo):
open('tag-mod.txt', "w").close()
git_repo.index.add("tag-mod.txt")
tag_commit = git_repo.index.commit("tag commit")
git_repo.create_tag("1.0.0", message="1.0.0")
open('post-tag-mod.txt', "w").close()
git_repo.index.add("post-tag-mod.txt")
post_tag_commit = git_repo.index.commit("post tag commit")
assert latest_tag_or_mod_commit("chartpress.yaml") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("tag-mod.txt") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]
def test_latest_tag_or_mod_commit(git_repo):
open('tag-mod.txt', "w").close()
git_repo.index.add("tag-mod.txt")
tag_commit = git_repo.index.commit("tag commit")
git_repo.create_tag("1.0.0", message="1.0.0")
open('post-tag-mod.txt', "w").close()
git_repo.index.add("post-tag-mod.txt")
post_tag_commit = git_repo.index.commit("post tag commit")
assert latest_tag_or_mod_commit("chartpress.yaml") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("tag-mod.txt") == tag_commit.hexsha[:7]
assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]