| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -401,7 +401,7 @@ def wait(self, stderr=b''): # TODO: Bad choice to mimic `proc.wait()` but with | |||
| 401 | 401 | :raise GitCommandError: if the return status is not 0""" | |
| 402 | 402 | if stderr is None: | |
| 403 | 403 | stderr = b'' | |
| 404 | - stderr = force_bytes(stderr) | ||
| 404 | + stderr = force_bytes(data=stderr, encoding='utf-8') | ||
| 405 | 405 | ||
| 406 | 406 | status = self.proc.wait() | |
| 407 | 407 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -245,6 +245,20 @@ def test_clone_from_pathlib_withConfig(self, rw_dir): | |||
| 245 | 245 | assert_equal(cloned.config_reader().get_value('core', 'filemode'), False) | |
| 246 | 246 | assert_equal(cloned.config_reader().get_value('submodule "repo"', 'update'), 'checkout') | |
| 247 | 247 | ||
| 248 | + def test_clone_from_with_path_contains_unicode(self): | ||
| 249 | + with tempfile.TemporaryDirectory() as tmpdir: | ||
| 250 | + unicode_dir_name = '\u0394' | ||
| 251 | + path_with_unicode = os.path.join(tmpdir, unicode_dir_name) | ||
| 252 | + os.makedirs(path_with_unicode) | ||
| 253 | + | ||
| 254 | + try: | ||
| 255 | + Repo.clone_from( | ||
| 256 | + url=self._small_repo_url(), | ||
| 257 | + to_path=path_with_unicode, | ||
| 258 | + ) | ||
| 259 | + except UnicodeEncodeError: | ||
| 260 | + self.fail('Raised UnicodeEncodeError') | ||
| 261 | + | ||
| 248 | 262 | @with_rw_repo('HEAD') | |
| 249 | 263 | def test_max_chunk_size(self, repo): | |
| 250 | 264 | class TestOutputStream(object): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments