File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ def tearDownClass(cls):
164
164
coders .SinglePrecisionFloatCoder ,
165
165
coders .ToBytesCoder ,
166
166
coders .BigIntegerCoder , # tested in DecimalCoder
167
+ coders .TimestampPrefixingOpaqueWindowCoder ,
167
168
])
168
169
cls .seen_nested -= set (
169
170
[coders .ProtoCoder , coders .ProtoPlusCoder , CustomCoder ])
@@ -739,6 +740,15 @@ def test_timestamp_prefixing_window_coder(self):
739
740
coders .IntervalWindowCoder ()), )),
740
741
(window .IntervalWindow (0 , 10 ), ))
741
742
743
+ def test_timestamp_prefixing_opaque_window_coder (self ):
744
+ sdk_coder = coders .TimestampPrefixingWindowCoder (
745
+ coders .LengthPrefixCoder (coders .PickleCoder ()))
746
+ safe_coder = coders .TimestampPrefixingOpaqueWindowCoder ()
747
+ for w in [window .IntervalWindow (1 , 123 ), window .GlobalWindow ()]:
748
+ round_trip = sdk_coder .decode (
749
+ safe_coder .encode (safe_coder .decode (sdk_coder .encode (w ))))
750
+ self .assertEqual (w , round_trip )
751
+
742
752
def test_decimal_coder (self ):
743
753
test_coder = coders .DecimalCoder ()
744
754
Original file line number Diff line number Diff line change @@ -314,6 +314,9 @@ def test_register_finalizations(self):
314
314
def test_custom_merging_window (self ):
315
315
raise unittest .SkipTest ("https://github.com/apache/beam/issues/20641" )
316
316
317
+ def test_custom_window_type (self ):
318
+ raise unittest .SkipTest ("https://github.com/apache/beam/issues/20641" )
319
+
317
320
# Inherits all other tests.
318
321
319
322
You can’t perform that action at this time.
0 commit comments