This is an automated email from the ASF dual-hosted git repository.
pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 8adba1e Test case for providing experiments to pipeline
8adba1e is described below
commit 8adba1e44ef101d7482acbca9c28a1848d125ea2
Author: Pablo <[email protected]>
AuthorDate: Fri Jun 29 15:31:49 2018 -0700
Test case for providing experiments to pipeline
---
sdks/python/apache_beam/options/value_provider_test.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sdks/python/apache_beam/options/value_provider_test.py
b/sdks/python/apache_beam/options/value_provider_test.py
index 3ddde06..8259d14 100644
--- a/sdks/python/apache_beam/options/value_provider_test.py
+++ b/sdks/python/apache_beam/options/value_provider_test.py
@@ -23,6 +23,7 @@ import logging
import unittest
from apache_beam.options.pipeline_options import PipelineOptions
+from apache_beam.options.pipeline_options import DebugOptions
from apache_beam.options.value_provider import RuntimeValueProvider
from apache_beam.options.value_provider import StaticValueProvider
@@ -199,6 +200,13 @@ class ValueProviderTests(unittest.TestCase):
# affect other cases since runtime_options is static attr
RuntimeValueProvider.set_runtime_options(None)
+ def test_experiments_options_setup(self):
+ options = PipelineOptions(['--experiments', 'a', '--experiments', 'b,c'])
+ options = options.view_as(DebugOptions)
+ self.assertIn('a', options.experiments)
+ self.assertIn('b,c', options.experiments)
+ self.assertNotIn('c', options.experiments)
+
if __name__ == '__main__':
logging.getLogger().setLevel(logging.INFO)