apache_beam.typehints.typecheck_test_py3 module

Unit tests for typecheck.

See additional runtime_type_check=True tests in ptransform_test.py.

class apache_beam.typehints.typecheck_test_py3.MyDoFn(output_filename)[source]

Bases: apache_beam.transforms.core.DoFn

start_bundle()[source]
finish_bundle()[source]
setup()[source]
teardown()[source]
process(element: int, *args, **kwargs) → Iterable[int][source]
class apache_beam.typehints.typecheck_test_py3.MyDoFnBadAnnotation(output_filename)[source]

Bases: apache_beam.typehints.typecheck_test_py3.MyDoFn

process(element: int, *args, **kwargs) → int[source]
class apache_beam.typehints.typecheck_test_py3.RuntimeTypeCheckTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]
test_setup()[source]
test_wrapper_pass_through()[source]
test_wrapper_pipeline_type_check()[source]
class apache_beam.typehints.typecheck_test_py3.PerformanceRuntimeTypeCheckTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]
assertStartswith(msg, prefix)[source]
test_simple_input_error()[source]
test_simple_output_error()[source]
test_simple_input_error_with_kwarg_typehints()[source]
test_do_fn_returning_non_iterable_throws_error()[source]
test_simple_type_satisfied()[source]
test_simple_type_violation()[source]
test_pipeline_checking_satisfied_but_run_time_types_violate()[source]
test_pipeline_runtime_checking_violation_composite_type_output()[source]
test_downstream_input_type_hint_error_has_descriptive_error_msg()[source]