[
https://issues.apache.org/jira/browse/BEAM-12000?focusedWorklogId=650841&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-650841
]
ASF GitHub Bot logged work on BEAM-12000:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Sep/21 22:31
Start Date: 14/Sep/21 22:31
Worklog Time Spent: 10m
Work Description: tvalentyn commented on a change in pull request #15415:
URL: https://github.com/apache/beam/pull/15415#discussion_r708702398
##########
File path: sdks/python/apache_beam/utils/proto_utils_test.py
##########
@@ -0,0 +1,25 @@
+import unittest
+from google.protobuf import timestamp_pb2
+
+from apache_beam.utils.proto_utils import pack_Any
+from apache_beam.utils.proto_utils import to_Timestamp
+from apache_beam.utils.proto_utils import unpack_Any
+
+
+class ProtoUtilsTest(unittest.TestCase):
+ def make_proto_timestamp(self):
+ # type: () -> timestamp_pb2.Timestamp
+ return to_Timestamp(0)
+
+ def test_none_pack(self):
+ packed_none = pack_Any(None)
+ assert packed_none is None
+
+ def test_date_pack(self):
+ # type: () -> None
+ proto_timestamp = self.make_proto_timestamp()
+ packed_msg = pack_Any(proto_timestamp)
+ orig_msg = unpack_Any(packed_msg, timestamp_pb2.Timestamp)
+ none_msg = unpack_Any(packed_msg, None)
+ assert proto_timestamp == orig_msg
+ assert none_msg is None
Review comment:
is this a left over given that you have a separate test_none_pack?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 650841)
Time Spent: 3h 40m (was: 3.5h)
> Support Python 3.9 in Apache Beam
> ---------------------------------
>
> Key: BEAM-12000
> URL: https://issues.apache.org/jira/browse/BEAM-12000
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Valentyn Tymofieiev
> Priority: P2
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)