diff options
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()) |