Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e8aa9b commit becf5efCopy full SHA for becf5ef
git/test/test_repo.py
@@ -384,13 +384,17 @@ def test_comparison_and_hash(self):
384
assert len(set((self.rorepo, self.rorepo))) == 1
385
386
@with_rw_directory
387
- def test_tilde_in_repo_path(self, rw_dir):
+ def test_tilde_and_env_vars_in_repo_path(self, rw_dir):
388
ph = os.environ['HOME']
389
try:
390
os.environ['HOME'] = rw_dir
391
- Repo.init(os.path.join(rw_dir, 'test.git'), bare=True)
+ 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)
395
finally:
396
os.environ['HOME'] = ph
397
+ del os.environ['FOO']
398
# end assure HOME gets reset to what it was
399
400
def test_git_cmd(self):
0 commit comments