Add unit tests for bytes and unicode Repositories
Add unit test for bytes repository paths Add a unicode path test for Repositories
This commit is contained in:
@@ -39,6 +39,8 @@ import os
|
||||
from os.path import join, realpath
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
# Import from pygit2
|
||||
from pygit2 import GIT_OBJ_ANY, GIT_OBJ_BLOB, GIT_OBJ_COMMIT
|
||||
from pygit2 import init_repository, clone_repository, discover_repository
|
||||
@@ -482,12 +484,17 @@ class EmptyRepositoryTest(utils.EmptyRepoTestCase):
|
||||
self.assertFalse(self.repo.head_is_detached)
|
||||
|
||||
|
||||
class BytesStringRepositoryTest(utils.NoRepoTestCase):
|
||||
class StringTypesRepositoryTest(utils.NoRepoTestCase):
|
||||
|
||||
def test_bytes_string(self):
|
||||
repo_path = b'./test/data/testrepo.git/'
|
||||
pygit2.Repository(repo_path)
|
||||
|
||||
def test_unicode_string(self):
|
||||
# String is unicode because of unicode_literals
|
||||
repo_path = './test/data/testrepo.git/'
|
||||
pygit2.Repository(repo_path)
|
||||
|
||||
|
||||
class CloneRepositoryTest(utils.NoRepoTestCase):
|
||||
|
||||
|
Reference in New Issue
Block a user