-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: accessing an unset struct_pb2.Value field does not raise (#140)
class Foo(proto.Message): value = proto.Field(struct_pb2.Value, number=1) f = Foo() assert f.value is None # This should not raise an exception. assert "value" not in f # The attribute has _not_ been set. f.value = None assert f.value is None assert "value" in f # The attribute _has_ been set. None of the above should raise an exception.
- Loading branch information
1 parent
6888d71
commit d045cbf
Showing
3 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters