コード例 #1
0
 def test_commit():
     mock = MagicMock()
     with patch("subprocess.call", mock):
         scm = SourceControl()
         scm.commit("my message")
     mock.assert_has_calls([
         call(["git.exe", "add", "-u"], env=ANY, shell=True),
         call(["git.exe", "commit", "-m", "my message"],
              env=ANY,
              shell=True)
     ])
コード例 #2
0
ファイル: test_releasing.py プロジェクト: fchauvel/flap
 def test_commit():
     mock = MagicMock()
     with patch("subprocess.call", mock):
         scm = SourceControl()
         scm.commit("my message")
     mock.assert_has_calls(
         [
             call(["git.exe", "add", "-u"], env=ANY, shell=True),
             call(["git.exe", "commit", "-m", "my message"], env=ANY, shell=True),
         ]
     )
コード例 #3
0
 def createSCM():
     scm = SourceControl()
     scm.tag = MagicMock()
     scm.commit = MagicMock()
     return scm
コード例 #4
0
ファイル: test_releasing.py プロジェクト: fchauvel/flap
 def createSCM():
     scm = SourceControl()
     scm.tag = MagicMock()
     scm.commit = MagicMock()
     return scm