diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-10 19:20:22 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-10 19:20:22 +0100 |
commit | 6e8aa9b0aefc30ee5807c2b2cf433a38555b7e0b (patch) | |
tree | 21085a6a7f94d6362e995bd3fe1cb77e28be36ed /git/test/test_repo.py | |
parent | 96c6ab4f7572fd5ca8638f3cb6e342d5000955e7 (diff) | |
download | gitpython-6e8aa9b0aefc30ee5807c2b2cf433a38555b7e0b.tar.gz |
Repo.init() now supports paths with a '~' in it, or environment variables in general.
Fixes #83
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 25acbec9..0153d886 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -383,6 +383,16 @@ class TestRepo(TestBase): assert self.rorepo == self.rorepo and not (self.rorepo != self.rorepo) assert len(set((self.rorepo, self.rorepo))) == 1 + @with_rw_directory + def test_tilde_in_repo_path(self, rw_dir): + ph = os.environ['HOME'] + try: + os.environ['HOME'] = rw_dir + Repo.init(os.path.join(rw_dir, 'test.git'), bare=True) + finally: + os.environ['HOME'] = ph + # end assure HOME gets reset to what it was + def test_git_cmd(self): # test CatFileContentStream, just to be very sure we have no fencepost errors # last \n is the terminating newline that it expects |