Skip to content
/ beam Public
forked from apache/beam

Commit

Permalink
Replaces unittest annotation with setting __test__ = False to prevent…
Browse files Browse the repository at this point in the history
… nosetest from trying to run the method.
  • Loading branch information
acrites committed Nov 8, 2019
1 parent be08efd commit f31a0df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import threading
import time
import traceback
import unittest
import urllib
from builtins import hex
from collections import defaultdict
Expand Down Expand Up @@ -1196,7 +1195,6 @@ def run__NativeWrite(self, transform_node, options):
PropertyNames.STEP_NAME: input_step.proto.name,
PropertyNames.OUTPUT_NAME: input_step.get_output(input_tag)})

@unittest.skip("This is not a test, despite the name.")
def run_TestStream(self, transform_node, options):
from apache_beam.portability.api import beam_runner_api_pb2
from apache_beam.testing.test_stream import ElementEvent
Expand Down Expand Up @@ -1239,6 +1237,10 @@ def run_TestStream(self, transform_node, options):
PropertyNames.OUTPUT_NAME: PropertyNames.OUT
}])

# We must mark this method as not a test or else its name is a matcher for
# nosetest tests.
run_TestStream.__test__ = False

@classmethod
def serialize_windowing_strategy(cls, windowing):
from apache_beam.runners import pipeline_context
Expand Down

0 comments on commit f31a0df

Please sign in to comment.