Skip to content

Commit

Permalink
try manually isorting again
Browse files Browse the repository at this point in the history
  • Loading branch information
hjtran committed Dec 6, 2024
1 parent 0a2c726 commit a0fac32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import types
import unittest
import apache_beam as beam

import apache_beam as beam
from apache_beam.typehints import row_type
from apache_beam.typehints import trivial_inference
from apache_beam.typehints import typehints
Expand Down
20 changes: 1 addition & 19 deletions sdks/python/apache_beam/typehints/typed_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

import typing
import unittest
from typing import Tuple
import apache_beam as beam

import apache_beam as beam
from apache_beam import pvalue
from apache_beam import typehints
from apache_beam.options.pipeline_options import OptionsContext
Expand Down Expand Up @@ -1000,22 +999,5 @@ def filter_fn(element: int) -> bool:
self.assertEqual(th.output_types, ((int, ), {}))


class TestFlatMapTuple(unittest.TestCase):
def test_flatmaptuple(self):
# Regression test. See
# https://github.com/apache/beam/issues/33014

def identity(x: Tuple[str, int]) -> Tuple[str, int]:
return x

with beam.Pipeline() as p:
# Just checking that this doesn't raise an exception.
(
p
| "Generate input" >> beam.Create([('P1', [2])])
| "Flat" >> beam.FlatMapTuple(lambda k, vs: [(k, v) for v in vs])
| "Identity" >> beam.Map(identity))


if __name__ == '__main__':
unittest.main()

0 comments on commit a0fac32

Please sign in to comment.