Remove branch coverage for optional attributes (temporary?)

This commit is contained in:
Vincent Jacques
2012-05-27 08:37:17 +01:00
parent 4aadfff21c
commit 93dcae5cf2
39 changed files with 366 additions and 366 deletions
+11 -11
View File
@@ -121,26 +121,26 @@ class PullRequestComment( object ):
for attribute in attributes:
assert attribute in [ "body", "commit_id", "created_at", "html_url", "id", "line", "path", "position", "updated_at", "url", "user", ], attribute
# @todo No need to check if attribute is in attributes when attribute is mandatory
if "body" in attributes and attributes[ "body" ] is not None:
if "body" in attributes and attributes[ "body" ] is not None: # pragma no branch
self.__body = attributes[ "body" ]
if "commit_id" in attributes and attributes[ "commit_id" ] is not None:
if "commit_id" in attributes and attributes[ "commit_id" ] is not None: # pragma no branch
self.__commit_id = attributes[ "commit_id" ]
if "created_at" in attributes and attributes[ "created_at" ] is not None:
if "created_at" in attributes and attributes[ "created_at" ] is not None: # pragma no branch
self.__created_at = attributes[ "created_at" ]
if "html_url" in attributes and attributes[ "html_url" ] is not None:
if "html_url" in attributes and attributes[ "html_url" ] is not None: # pragma no branch
self.__html_url = attributes[ "html_url" ]
if "id" in attributes and attributes[ "id" ] is not None:
if "id" in attributes and attributes[ "id" ] is not None: # pragma no branch
self.__id = attributes[ "id" ]
if "line" in attributes and attributes[ "line" ] is not None:
if "line" in attributes and attributes[ "line" ] is not None: # pragma no branch
self.__line = attributes[ "line" ]
if "path" in attributes and attributes[ "path" ] is not None:
if "path" in attributes and attributes[ "path" ] is not None: # pragma no branch
self.__path = attributes[ "path" ]
if "position" in attributes and attributes[ "position" ] is not None:
if "position" in attributes and attributes[ "position" ] is not None: # pragma no branch
self.__position = attributes[ "position" ]
if "updated_at" in attributes and attributes[ "updated_at" ] is not None:
if "updated_at" in attributes and attributes[ "updated_at" ] is not None: # pragma no branch
self.__updated_at = attributes[ "updated_at" ]
if "url" in attributes and attributes[ "url" ] is not None:
if "url" in attributes and attributes[ "url" ] is not None: # pragma no branch
self.__url = attributes[ "url" ]
if "user" in attributes and attributes[ "user" ] is not None:
if "user" in attributes and attributes[ "user" ] is not None: # pragma no branch
assert isinstance( attributes[ "user" ], dict )
self.__user = NamedUser.NamedUser( self.__requester, attributes[ "user" ], completion = LazyCompletion )