diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-27 22:07:19 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-28 03:35:38 +0200 |
commit | 137ee6ef22c4e6480f95972ef220d1832cdc709a (patch) | |
tree | 20d611a4746b5fc4d188673ec309d24e29be5683 /git/test/test_git.py | |
parent | 434505f1b6f882978de17009854d054992b827cf (diff) | |
download | gitpython-137ee6ef22c4e6480f95972ef220d1832cdc709a.tar.gz |
Win, #519: FIX with_rw_directory() to remove read-only dirs
+ Stop using gitdb's respective helper.
+ Fix files chmod(555) which CANNOT DELETE on Windows (but do on Linux).
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 36bbbb10..a676d7f7 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -24,7 +24,7 @@ from git import ( Repo, cmd ) -from gitdb.test.lib import with_rw_directory +from git.test.lib import with_rw_directory from git.compat import PY3, is_darwin @@ -174,7 +174,7 @@ class TestGit(TestBase): def test_env_vars_passed_to_git(self): editor = 'non_existant_editor' - with mock.patch.dict('os.environ', {'GIT_EDITOR': editor}): + with mock.patch.dict('os.environ', {'GIT_EDITOR': editor}): # @UndefinedVariable self.assertEqual(self.git.var("GIT_EDITOR"), editor) @with_rw_directory @@ -203,7 +203,7 @@ class TestGit(TestBase): stream.write("#!/usr/bin/env sh\n" + "echo FOO\n") stream.close() - os.chmod(path, 0o555) + os.chmod(path, 0o777) rw_repo = Repo.init(os.path.join(rw_dir, 'repo')) remote = rw_repo.create_remote('ssh-origin', "ssh://git@server/foo") @@ -220,9 +220,6 @@ class TestGit(TestBase): self.assertEqual(err.status, 128) else: self.assertIn('FOO', str(err)) - # end - # end - # end if select.poll exists def test_handle_process_output(self): from git.cmd import handle_process_output |