コード例 #1
0
ファイル: combiners_test.py プロジェクト: horvathaa/beamTest
 def test_combine_globally_without_default(self):
     with TestPipeline() as p:
         result = p | Create([]) | CombineGlobally(sum).without_defaults()
         assert_that(result, equal_to([]))
コード例 #2
0
ファイル: combiners_test.py プロジェクト: horvathaa/beamTest
 def expand(self, pcoll):
     side = pcoll | CombineGlobally(sum).as_singleton_view()
     main = pcoll.pipeline | Create([None])
     return main | Map(lambda _, s: s, side)
コード例 #3
0
ファイル: combiners_test.py プロジェクト: horvathaa/beamTest
 def test_combine_globally_with_default(self):
     with TestPipeline() as p:
         assert_that(p | Create([]) | CombineGlobally(sum), equal_to([0]))