diff options
author | Piotr Babij <piotr.babij@gmail.com> | 2017-09-30 22:00:02 +0200 |
---|---|---|
committer | Piotr Babij <piotr.babij@gmail.com> | 2017-09-30 22:00:02 +0200 |
commit | 53373c8069425af5007fb0daac54f44f9aadb288 (patch) | |
tree | 6c495c5174f52c9cfff894e6fe04bbe4b2ff4e17 /git/test/test_repo.py | |
parent | ddb828ecd0e28d346934fd1838a5f1c74363fba6 (diff) | |
download | gitpython-53373c8069425af5007fb0daac54f44f9aadb288.tar.gz |
Keeping env values passed to `clone_from`
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 312e67f9..86fb2f51 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -201,6 +201,15 @@ class TestRepo(TestBase): pass # END test repos with working tree + @with_rw_directory + def test_clone_from_keeps_env(self, rw_dir): + original_repo = Repo.init(osp.join(rw_dir, "repo")) + environment = {"entry1": "value", "another_entry": "10"} + + cloned = Repo.clone_from(original_repo.git_dir, osp.join(rw_dir, "clone"), env=environment) + + assert_equal(environment, cloned.git.environment()) + def test_init(self): prev_cwd = os.getcwd() os.chdir(tempfile.gettempdir()) |