summaryrefslogtreecommitdiff
path: root/git/test/test_repo.py
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 20:51:04 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 20:51:21 +0100
commitbe34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (patch)
tree7d0124054760421d95a6f675d8e843e42a72ad82 /git/test/test_repo.py
parentf5d11b750ecc982541d1f936488248f0b42d75d3 (diff)
downloadgitpython-be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6.tar.gz
pep8 linting (blank lines expectations)
E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r--git/test/test_repo.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index 1ecd2ae4..38c03b7a 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -103,7 +103,6 @@ class TestRepo(TestBase):
# END for each tree
assert num_trees == mc
-
def _assert_empty_repo(self, repo):
# test all kinds of things with an empty, freshly initialized repo.
# It should throw good errors
@@ -131,7 +130,6 @@ class TestRepo(TestBase):
pass
# END test repos with working tree
-
def test_init(self):
prev_cwd = os.getcwd()
os.chdir(tempfile.gettempdir())
@@ -153,7 +151,6 @@ class TestRepo(TestBase):
rc = r.clone(clone_path)
self._assert_empty_repo(rc)
-
try:
shutil.rmtree(clone_path)
except OSError:
@@ -362,6 +359,7 @@ class TestRepo(TestBase):
return Git.CatFileContentStream(len(d)-1, StringIO(d))
ts = 5
+
def mktiny():
return Git.CatFileContentStream(ts, StringIO(d))
@@ -434,7 +432,6 @@ class TestRepo(TestBase):
assert obj.type == 'blob' and obj.path == 'CHANGES'
assert rev_obj.tree['CHANGES'] == obj
-
def _assert_rev_parse(self, name):
"""tries multiple different rev-parse syntaxes with the given name
:return: parsed object"""
@@ -521,13 +518,11 @@ class TestRepo(TestBase):
assert tag.object == rev_parse(tag.object.hexsha)
self._assert_rev_parse_types(tag.object.hexsha, tag.object)
-
# multiple tree types result in the same tree: HEAD^{tree}^{tree}:CHANGES
rev = '0.1.4^{tree}^{tree}'
assert rev_parse(rev) == tag.object.tree
assert rev_parse(rev+':CHANGES') == tag.object.tree['CHANGES']
-
# try to get parents from first revision - it should fail as no such revision
# exists
first_rev = "33ebe7acec14b25c5f84f35a664803fcab2f7781"
@@ -543,11 +538,9 @@ class TestRepo(TestBase):
commit2 = rev_parse(first_rev[:5])
assert commit2 == commit
-
# todo: dereference tag into a blob 0.1.7^{blob} - quite a special one
# needs a tag which points to a blob
-
# ref^0 returns commit being pointed to, same with ref~0, and ^{}
tag = rev_parse('0.1.4')
for token in (('~0', '^0', '^{}')):