Skip to content

Commit

Permalink
Remove a deprecated test helper. (#31236)
Browse files Browse the repository at this point in the history
* Remove a deprecated test helper.

* yapf
  • Loading branch information
tvalentyn authored May 10, 2024
1 parent 5ee63c0 commit 0a58d7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/options/pipeline_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_display_data(self, flags, _, display_data):
@parameterized.expand(TEST_CASES)
def test_get_all_options_subclass(self, flags, expected, _):
options = PipelineOptionsTest.MockOptions(flags=flags)
self.assertDictContainsSubset(expected, options.get_all_options())
self.assertLessEqual(expected.items(), options.get_all_options().items())
self.assertEqual(
options.view_as(PipelineOptionsTest.MockOptions).mock_flag,
expected['mock_flag'])
Expand All @@ -219,7 +219,7 @@ def test_get_all_options_subclass(self, flags, expected, _):
@parameterized.expand(TEST_CASES)
def test_get_all_options(self, flags, expected, _):
options = PipelineOptions(flags=flags)
self.assertDictContainsSubset(expected, options.get_all_options())
self.assertLessEqual(expected.items(), options.get_all_options().items())
self.assertEqual(
options.view_as(PipelineOptionsTest.MockOptions).mock_flag,
expected['mock_flag'])
Expand Down
5 changes: 3 additions & 2 deletions sdks/python/apache_beam/testing/test_pipeline_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ def test_empty_option_args_parsing(self):
def test_create_test_pipeline_options(self):
test_pipeline = TestPipeline(argv=self.TEST_CASE['options'])
test_options = PipelineOptions(test_pipeline.get_full_options_as_args())
self.assertDictContainsSubset(
self.TEST_CASE['expected_dict'], test_options.get_all_options())
self.assertLessEqual(
self.TEST_CASE['expected_dict'].items(),
test_options.get_all_options().items())

EXTRA_OPT_CASES = [{
'options': {
Expand Down

0 comments on commit 0a58d7d

Please sign in to comment.