Skip to content

Commit becf5ef

Browse files
committed
Fixed test to actually use tilde and environment variables respectively.
Related to #83
1 parent 6e8aa9b commit becf5ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

git/test/test_repo.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,17 @@ def test_comparison_and_hash(self):
384384
assert len(set((self.rorepo, self.rorepo))) == 1
385385

386386
@with_rw_directory
387-
def test_tilde_in_repo_path(self, rw_dir):
387+
def test_tilde_and_env_vars_in_repo_path(self, rw_dir):
388388
ph = os.environ['HOME']
389389
try:
390390
os.environ['HOME'] = rw_dir
391-
Repo.init(os.path.join(rw_dir, 'test.git'), bare=True)
391+
Repo.init(os.path.join('~', 'test.git'), bare=True)
392+
393+
os.environ['FOO'] = rw_dir
394+
Repo.init(os.path.join('$FOO', 'test.git'), bare=True)
392395
finally:
393396
os.environ['HOME'] = ph
397+
del os.environ['FOO']
394398
# end assure HOME gets reset to what it was
395399

396400
def test_git_cmd(self):

0 commit comments

Comments
 (0)