summaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
diff options
context:
space:
mode:
authorVictor Luzgin <luzgin.st@gmail.com>2019-10-26 19:24:08 +0300
committerSebastian Thiel <sebastian.thiel@icloud.com>2019-10-28 09:00:34 +0100
commitebf46561837f579d202d7bd4a22362f24fb858a4 (patch)
tree1c226ce35453bc211dd4fa1dc01c4729a5f4bb6d /git/test/test_repo.py
parent87a103d8c28b496ead8b4dd8215b103414f8b7f8 (diff)
downloadgitpython-ebf46561837f579d202d7bd4a22362f24fb858a4.tar.gz
Fix #920
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r--git/test/test_repo.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index de1e951a..c59203ed 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -245,6 +245,20 @@ class TestRepo(TestBase):
assert_equal(cloned.config_reader().get_value('core', 'filemode'), False)
assert_equal(cloned.config_reader().get_value('submodule "repo"', 'update'), 'checkout')
+ def test_clone_from_with_path_contains_unicode(self):
+ with tempfile.TemporaryDirectory() as tmpdir:
+ unicode_dir_name = '\u0394'
+ path_with_unicode = os.path.join(tmpdir, unicode_dir_name)
+ os.makedirs(path_with_unicode)
+
+ try:
+ Repo.clone_from(
+ url=self._small_repo_url(),
+ to_path=path_with_unicode,
+ )
+ except UnicodeEncodeError:
+ self.fail('Raised UnicodeEncodeError')
+
@with_rw_repo('HEAD')
def test_max_chunk_size(self, repo):
class TestOutputStream(object):