コード例 #1
0
ファイル: test_shell.py プロジェクト: wildi1/gitman
 def test_mkdir(self, mock_call):
     """Verify the commands to create directories."""
     shell.mkdir('mock/dirpath')
     if os.name == 'nt':
         check_calls(mock_call, ["mkdir mock/dirpath"])
     else:
         check_calls(mock_call, ["mkdir -p mock/dirpath"])
コード例 #2
0
    def it_should_fail_on_missing_repositories(config):
        shell.mkdir("deps")
        shell.rm(os.path.join("deps", "gitman_1"))

        with pytest.raises(InvalidRepository):
            gitman.lock()

        expect(config.__mapper__.text).does_not_contain("<unknown>")
コード例 #3
0
    def it_detects_invalid_repositories(config):
        shell.rm(os.path.join("deps", "gitman_1", ".git"))
        shell.mkdir(os.path.join("deps", "gitman_1", ".git"))

        try:
            with pytest.raises(InvalidRepository):
                expect(gitman.install('gitman_1', depth=1)) == False

        finally:
            shell.rm(os.path.join("deps", "gitman_1"))
コード例 #4
0
    def it_should_fail_on_invalid_repositories(config):
        shell.mkdir("deps")
        shell.rm(os.path.join("deps", "gitman_1", ".git"))
        shell.mkdir(os.path.join("deps", "gitman_1", ".git"))

        try:
            with pytest.raises(InvalidRepository):
                gitman.lock()

            expect(config.datafile.text).does_not_contain("<unknown>")

        finally:
            shell.rm(os.path.join("deps", "gitman_1"))
コード例 #5
0
ファイル: test_shell.py プロジェクト: aepsil0n/gitman
 def test_mkdir(self, mock_call):
     """Verify the commands to create directories."""
     shell.mkdir('mock/name/path')
     assert_calls(mock_call, ["mkdir -p mock/name/path"])