Skip to content

Commit c1c1769

Browse files
committed
fix stream exclusion logic
1 parent eb76821 commit c1c1769

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

airbyte_cdk/test/standard_tests/docker_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ def test_docker_image_build_and_read(
354354
set(streams_list) - set(stream.name for stream in scenario.empty_streams)
355355
)
356356

357+
if scenario.empty_streams:
358+
# Filter out streams marked as empty in the scenario.
359+
empty_stream_names = [stream.name for stream in scenario.empty_streams]
360+
streams_list = [s for s in streams_list if s.name not in empty_stream_names]
361+
357362
configured_catalog: ConfiguredAirbyteCatalog = ConfiguredAirbyteCatalog(
358363
streams=[
359364
ConfiguredAirbyteStream(

airbyte_cdk/test/standard_tests/source_base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ def test_basic_read(
123123
streams = discover_result.catalog.catalog.streams # type: ignore [reportOptionalMemberAccess, union-attr]
124124

125125
if scenario.empty_streams:
126-
# Don't read from any streams marked as empty in the scenario.
127-
streams = list(set(streams) - set(stream.name for stream in scenario.empty_streams))
128-
126+
# Filter out streams marked as empty in the scenario.
127+
empty_stream_names = [stream.name for stream in scenario.empty_streams]
128+
streams = [s for s in streams if s.name not in empty_stream_names]
129+
129130
configured_catalog = ConfiguredAirbyteCatalog(
130131
streams=[
131132
ConfiguredAirbyteStream(

0 commit comments

Comments
 (0)