You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/02/10 17:00:38 UTC

[beam] 01/01: Add dependencies in some examples

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/dependenciesInExamples
in repository https://gitbox.apache.org/repos/asf/beam.git

commit e5d9404e7ea7e253d91f890d6d956bdfaa433505
Author: Danny McCormick <da...@google.com>
AuthorDate: Fri Feb 10 12:00:28 2023 -0500

    Add dependencies in some examples
---
 .../content/en/documentation/pipelines/test-your-pipeline.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/website/www/site/content/en/documentation/pipelines/test-your-pipeline.md b/website/www/site/content/en/documentation/pipelines/test-your-pipeline.md
index 969cc8b35a8..00af2c00478 100644
--- a/website/www/site/content/en/documentation/pipelines/test-your-pipeline.md
+++ b/website/www/site/content/en/documentation/pipelines/test-your-pipeline.md
@@ -157,6 +157,8 @@ public class CountTest {
 {{< /highlight >}}
 
 {{< highlight py >}}
+import unittest
+import apache_beam as beam
 from apache_beam.testing.test_pipeline import TestPipeline
 from apache_beam.testing.util import assert_that
 from apache_beam.testing.util import equal_to
@@ -244,6 +246,16 @@ public class WordCountTest {
 {{< /highlight >}}
 
 {{< highlight py >}}
+import unittest
+import apache_beam as beam
+from apache_beam.testing.test_pipeline import TestPipeline
+from apache_beam.testing.util import assert_that
+from apache_beam.testing.util import equal_to
+    
+class CountWords(beam.PTransform):
+    # CountWords transform omitted for conciseness.
+    # Full transform can be found here - https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount_debugging.py
+
 class WordCountTest(unittest.TestCase):
 
   # Our input data, which will make up the initial PCollection.