def is_undefined_if_specific_commit_checkout(self): # Just a sanity check; current logic doesn't differentiate between e.g. # 'gobbledygook' and 'HEAD'. c = MockContext(run=Result("HEAD")) assert _release_line(c)[1] == Release.UNDEFINED
def assumes_feature_if_master(self): c = MockContext(run=Result("master")) assert _release_line(c)[1] == Release.FEATURE
def is_undefined_if_arbitrary_branch_name(self): c = MockContext(run=Result("yea-whatever")) assert _release_line(c)[1] == Release.UNDEFINED
def assumes_bugfix_if_release_branch(self): c = MockContext(run=Result("2.7")) assert _release_line(c)[1] == Release.BUGFIX