Rename Patch.binary to Patch.is_binary for consistency

This commit is contained in:
J. David Ibáñez
2013-10-31 09:24:00 +01:00
parent b382d3c3c1
commit 50744352d7
2 changed files with 4 additions and 4 deletions

View File

@@ -161,10 +161,10 @@ PyMemberDef Patch_members[] = {
{NULL} {NULL}
}; };
PyDoc_STRVAR(Patch_binary__doc__, "Binary."); PyDoc_STRVAR(Patch_is_binary__doc__, "True if binary data, False if not.");
PyObject * PyObject *
Patch_binary__get__(Patch *self) Patch_is_binary__get__(Patch *self)
{ {
if (!(self->flags & GIT_DIFF_FLAG_NOT_BINARY) && if (!(self->flags & GIT_DIFF_FLAG_NOT_BINARY) &&
(self->flags & GIT_DIFF_FLAG_BINARY)) (self->flags & GIT_DIFF_FLAG_BINARY))
@@ -173,7 +173,7 @@ Patch_binary__get__(Patch *self)
} }
PyGetSetDef Patch_getseters[] = { PyGetSetDef Patch_getseters[] = {
GETTER(Patch, binary), GETTER(Patch, is_binary),
{NULL} {NULL}
}; };

View File

@@ -175,7 +175,7 @@ class DiffTest(utils.BareRepoTestCase):
self.assertEqual(patch.old_file_path, 'a') self.assertEqual(patch.old_file_path, 'a')
self.assertEqual(patch.new_file_path, 'a') self.assertEqual(patch.new_file_path, 'a')
self.assertEqual(patch.binary, False) self.assertEqual(patch.is_binary, False)
_test(commit_a.tree.diff_to_tree(commit_b.tree)) _test(commit_a.tree.diff_to_tree(commit_b.tree))
_test(self.repo.diff(COMMIT_SHA1_1, COMMIT_SHA1_2)) _test(self.repo.diff(COMMIT_SHA1_1, COMMIT_SHA1_2))