From becf5efbfc4aee2677e29e1c8cbd756571cb649d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 10 Jan 2015 19:23:39 +0100 Subject: Fixed test to actually use tilde and environment variables respectively. Related to #83 --- git/test/test_repo.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'git/test/test_repo.py') 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): -- cgit v1.2.1