apache / apache/beam

"An Example Test for a Composite Transform" in Python is broken

Open
#20,876 0 comments 0 reactions 0 assignees View on GitHub
bug P3 python website
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

The example test code does not run [1]:
- Python reports a Syntax error "SyntaxError: unexpected EOF while parsing"
- Missing imports: "import unittest" and "import apache_beam as beam"
- After fixing the above issues, I get: "AttributeError: module 'apache_beam' has no attribute 'TestPipeline'". It looks like this import is just wrong. I tracked it down via code search in "apache_beam.testing.test_pipeline"

[1] https://beam.apache.org/documentation/pipelines/test-your-pipeline/#an-example-test-for-a-composite-transform

Imported from Jira [BEAM-12236](https://issues.apache.org/jira/browse/BEAM-12236). Original Jira may contain additional context.
Reported by: shoyer.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.