summaryrefslogtreecommitdiff
path: root/git/test
diff options
context:
space:
mode:
Diffstat (limited to 'git/test')
-rw-r--r--git/test/test_remote.py4
-rw-r--r--git/test/test_repo.py14
2 files changed, 16 insertions, 2 deletions
diff --git a/git/test/test_remote.py b/git/test/test_remote.py
index 95898f12..3ef47472 100644
--- a/git/test/test_remote.py
+++ b/git/test/test_remote.py
@@ -31,7 +31,7 @@ from git.test.lib import (
GIT_DAEMON_PORT,
assert_raises
)
-from git.util import IterableList, rmtree, HIDE_WINDOWS_FREEZE_ERRORS
+from git.util import rmtree, HIDE_WINDOWS_FREEZE_ERRORS
import os.path as osp
@@ -325,7 +325,7 @@ class TestRemote(TestBase):
self._commit_random_file(rw_repo)
progress = TestRemoteProgress()
res = remote.push(lhead.reference, progress)
- self.assertIsInstance(res, IterableList)
+ self.assertIsInstance(res, list)
self._do_test_push_result(res, remote)
progress.make_assertion()
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):