예제 #1
0
def test_no_tag():
    scm = Scm('/foo')
    scm._git = MagicMock(side_effect=ProcessExecutionError([], 1, '!', '!'))
    assert scm.tag == None
예제 #2
0
def test_branch():
    scm = Scm('/foo')
    scm._git = MagicMock(return_value='master')
    assert scm.branch == 'master'
예제 #3
0
def test_some_tag():
    scm = Scm('/foo')
    scm._git = MagicMock(return_value='v1.2')
    assert scm.tag == 'v1.2'
예제 #4
0
def setup_last_commit_scm():
    scm = Scm('/foo')
    git_result = '0101beef\n1386816309\nJohn Doe\nFix bugs'
    scm._git = MagicMock(return_value=git_result)
    return scm
예제 #5
0
def test_no_tag():
    scm = Scm("/foo")
    scm._git = MagicMock(side_effect=ProcessExecutionError([], 1, "!", "!"))
    assert scm.tag == None
예제 #6
0
def test_some_tag():
    scm = Scm("/foo")
    scm._git = MagicMock(return_value="v1.2")
    assert scm.tag == "v1.2"
예제 #7
0
def test_branch():
    scm = Scm("/foo")
    scm._git = MagicMock(return_value="master")
    assert scm.branch == "master"
예제 #8
0
def setup_last_commit_scm():
    scm = Scm("/foo")
    git_result = "0101beef\n1386816309\nJohn Doe\nFix bugs"
    scm._git = MagicMock(return_value=git_result)
    return scm