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
+5 -5
View File
@@ -87,14 +87,14 @@ class UserKey( object ):
for attribute in attributes:
assert attribute in [ "id", "key", "title", "url", "verified", ], attribute
# @todo No need to check if attribute is in attributes when attribute is mandatory
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 "key" in attributes and attributes[ "key" ] is not None:
if "key" in attributes and attributes[ "key" ] is not None: # pragma no branch
self.__key = attributes[ "key" ]
if "title" in attributes and attributes[ "title" ] is not None:
if "title" in attributes and attributes[ "title" ] is not None: # pragma no branch
self.__title = attributes[ "title" ]
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 "verified" in attributes and attributes[ "verified" ] is not None:
if "verified" in attributes and attributes[ "verified" ] is not None: # pragma no branch
assert isinstance( attributes[ "verified" ], bool )
self.__verified = attributes[ "verified" ]