Cleanup dataflow_test.

Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/e0643774
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/e0643774
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/e0643774

Branch: refs/heads/python-sdk
Commit: e06437746d0052f8e4af3edd5b19e4369038f826
Parents: 342d2d7
Author: Robert Bradshaw <rober...@google.com>
Authored: Wed Jul 6 14:45:58 2016 -0700
Committer: Robert Bradshaw <rober...@google.com>
Committed: Thu Jul 7 11:50:49 2016 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/dataflow_test.py | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/e0643774/sdks/python/apache_beam/dataflow_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/dataflow_test.py 
b/sdks/python/apache_beam/dataflow_test.py
index d3721ee..c4933af 100644
--- a/sdks/python/apache_beam/dataflow_test.py
+++ b/sdks/python/apache_beam/dataflow_test.py
@@ -46,7 +46,7 @@ from apache_beam.transforms.window import WindowFn
 class DataflowTest(unittest.TestCase):
   """Dataflow integration tests."""
 
-  SAMPLE_DATA = 'aa bb cc aa bb aa \n' * 10
+  SAMPLE_DATA = ['aa bb cc aa bb aa \n'] * 10
   SAMPLE_RESULT = [('cc', 10), ('bb', 20), ('aa', 30)]
 
   # TODO(silviuc): Figure out a nice way to specify labels for stages so that
@@ -61,7 +61,7 @@ class DataflowTest(unittest.TestCase):
 
   def test_word_count(self):
     pipeline = Pipeline('DirectPipelineRunner')
-    lines = pipeline | Create('SomeWords', [DataflowTest.SAMPLE_DATA])
+    lines = pipeline | Create('SomeWords', DataflowTest.SAMPLE_DATA)
     result = (
         (lines | FlatMap('GetWords', lambda x: re.findall(r'\w+', x)))
         .apply('CountWords', DataflowTest.Count))
@@ -77,15 +77,6 @@ class DataflowTest(unittest.TestCase):
     assert_that(result, equal_to(['foo-A', 'foo-B', 'foo-C']))
     pipeline.run()
 
-  def test_word_count_using_get(self):
-    pipeline = Pipeline('DirectPipelineRunner')
-    lines = pipeline | Create('SomeWords', [DataflowTest.SAMPLE_DATA])
-    result = (
-        (lines | FlatMap('GetWords', lambda x: re.findall(r'\w+', x)))
-        .apply('CountWords', DataflowTest.Count))
-    assert_that(result, equal_to(DataflowTest.SAMPLE_RESULT))
-    pipeline.run()
-
   def test_par_do_with_side_input_as_arg(self):
     pipeline = Pipeline('DirectPipelineRunner')
     words_list = ['aa', 'bb', 'cc']

Reply via email to