summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-10 19:23:39 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-10 19:23:39 +0100
commitbecf5efbfc4aee2677e29e1c8cbd756571cb649d (patch)
tree2a96fd76601b9566185f876c1934c4ac5b4f77db
parent6e8aa9b0aefc30ee5807c2b2cf433a38555b7e0b (diff)
downloadgitpython-becf5efbfc4aee2677e29e1c8cbd756571cb649d.tar.gz
Fixed test to actually use tilde and environment variables respectively.
Related to #83
-rw-r--r--git/test/test_repo.py8
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):