Adding a DirtyRepoTestCase to be able to test Repository.status().
Also, adding a dirty repository in the data directory.
This commit is contained in:
parent
f4e75e5b6f
commit
d313af21a0
test
BIN
test/data/dirtyrepo.tar
Normal file
BIN
test/data/dirtyrepo.tar
Normal file
Binary file not shown.
@ -66,8 +66,10 @@ class BareRepoTestCase(BaseTestCase):
|
|||||||
|
|
||||||
class RepoTestCase(BaseTestCase):
|
class RepoTestCase(BaseTestCase):
|
||||||
|
|
||||||
|
repo_dir = 'testrepo'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
repo_dir = 'testrepo'
|
repo_dir = self.repo_dir
|
||||||
repo_path = os.path.join(os.path.dirname(__file__), 'data', repo_dir)
|
repo_path = os.path.join(os.path.dirname(__file__), 'data', repo_dir)
|
||||||
temp_dir = tempfile.mkdtemp()
|
temp_dir = tempfile.mkdtemp()
|
||||||
tar = tarfile.open(repo_path + '.tar')
|
tar = tarfile.open(repo_path + '.tar')
|
||||||
@ -76,3 +78,7 @@ class RepoTestCase(BaseTestCase):
|
|||||||
self._temp_dir = temp_dir
|
self._temp_dir = temp_dir
|
||||||
temp_repo_path = os.path.join(temp_dir, repo_dir, '.git')
|
temp_repo_path = os.path.join(temp_dir, repo_dir, '.git')
|
||||||
self.repo = pygit2.Repository(temp_repo_path)
|
self.repo = pygit2.Repository(temp_repo_path)
|
||||||
|
|
||||||
|
class DirtyRepoTestCase(RepoTestCase):
|
||||||
|
|
||||||
|
repo_dir = 'dirtyrepo'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user