diff options
Diffstat (limited to 'test/git')
-rw-r--r-- | test/git/test_index.py | 16 | ||||
-rw-r--r-- | test/git/test_remote.py | 11 |
2 files changed, 12 insertions, 15 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py index 3312abe1..3345949b 100644 --- a/test/git/test_index.py +++ b/test/git/test_index.py @@ -199,6 +199,9 @@ class TestTree(TestBase): def _count_existing(self, repo, files): + """ + Returns count of files that actually exist in the repository directory. + """ existing = 0 basedir = repo.git.git_dir for f in files: @@ -207,19 +210,6 @@ class TestTree(TestBase): return existing # END num existing helper - - def _make_file(self, rela_path, data, repo=None): - """ - Create a file at the given path relative to our repository, filled - with the given data. Returns absolute path to created file. - """ - repo = repo or self.rorepo - abs_path = os.path.join(repo.git.git_dir, rela_path) - fp = open(abs_path, "w") - fp.write(data) - fp.close() - return abs_path - @with_rw_repo('0.1.6') def test_index_mutation(self, rw_repo): index = rw_repo.index diff --git a/test/git/test_remote.py b/test/git/test_remote.py index ef00056d..f1e25ebf 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -59,11 +59,18 @@ class TestRemote(TestBase): assert remote.rename(prev_name).name == prev_name # END for each rename ( back to prev_name ) - remote.fetch() + # FETCH TESTING + assert len(remote.fetch()) == 1 + + + self.fail("rejected parsing") + self.fail("test parsing of each individual flag") + # PULL TESTING + # fails as we did not specify a branch and there is no configuration for it self.failUnlessRaises(GitCommandError, remote.pull) remote.pull('master') remote.update() - self.fail("test push once there is a test-repo") + # END for each remote assert num_remotes assert num_remotes == len(remote_set) |