diff options
-rw-r--r-- | git/test/test_repo.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 0153d886..3abd9cd0 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -384,13 +384,17 @@ class TestRepo(TestBase): assert len(set((self.rorepo, self.rorepo))) == 1 @with_rw_directory - def test_tilde_in_repo_path(self, rw_dir): + def test_tilde_and_env_vars_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) + Repo.init(os.path.join('~', 'test.git'), bare=True) + + os.environ['FOO'] = rw_dir + Repo.init(os.path.join('$FOO', 'test.git'), bare=True) finally: os.environ['HOME'] = ph + del os.environ['FOO'] # end assure HOME gets reset to what it was def test_git_cmd(self): |