|
2 | 2 |
|
3 | 3 | import pytest
|
4 | 4 |
|
5 |
| -from quixstreams.models.topics.exceptions import TopicPartitionsMismatch |
6 | 5 | from quixstreams.state.exceptions import StoreAlreadyRegisteredError
|
7 | 6 |
|
8 | 7 |
|
@@ -71,25 +70,6 @@ def test_how(
|
71 | 70 | )
|
72 | 71 | assert joined_value == expected
|
73 | 72 |
|
74 |
| - def test_how_invalid_value(self, topic_manager_topic_factory, create_sdf): |
75 |
| - left_topic = topic_manager_topic_factory() |
76 |
| - right_topic = topic_manager_topic_factory() |
77 |
| - left_sdf, right_sdf = create_sdf(left_topic), create_sdf(right_topic) |
78 |
| - |
79 |
| - match = 'Invalid "how" value' |
80 |
| - with pytest.raises(ValueError, match=match): |
81 |
| - left_sdf.join_asof(right_sdf, how="invalid") |
82 |
| - |
83 |
| - def test_mismatching_partitions_fails( |
84 |
| - self, topic_manager_topic_factory, create_sdf |
85 |
| - ): |
86 |
| - left_topic = topic_manager_topic_factory() |
87 |
| - right_topic = topic_manager_topic_factory(partitions=2) |
88 |
| - left_sdf, right_sdf = create_sdf(left_topic), create_sdf(right_topic) |
89 |
| - |
90 |
| - with pytest.raises(TopicPartitionsMismatch): |
91 |
| - left_sdf.join_asof(right_sdf) |
92 |
| - |
93 | 73 | @pytest.mark.parametrize(
|
94 | 74 | "on_merge, right, left, expected",
|
95 | 75 | [
|
@@ -165,15 +145,6 @@ def test_on_merge(
|
165 | 145 | )
|
166 | 146 | assert joined_value == [(expected, b"key", 2, None)]
|
167 | 147 |
|
168 |
| - def test_on_merge_invalid_value(self, topic_manager_topic_factory, create_sdf): |
169 |
| - left_topic = topic_manager_topic_factory() |
170 |
| - right_topic = topic_manager_topic_factory() |
171 |
| - left_sdf, right_sdf = create_sdf(left_topic), create_sdf(right_topic) |
172 |
| - |
173 |
| - match = 'Invalid "on_merge"' |
174 |
| - with pytest.raises(ValueError, match=match): |
175 |
| - left_sdf.join_asof(right_sdf, on_merge="invalid") |
176 |
| - |
177 | 148 | def test_on_merge_callback(
|
178 | 149 | self, topic_manager_topic_factory, create_sdf, assign_partition, publish
|
179 | 150 | ):
|
@@ -223,22 +194,6 @@ def test_grace_ms(
|
223 | 194 | assert publish_left(timestamp=4) == []
|
224 | 195 | assert publish_left(timestamp=5) == [({"left": 4, "right": 2}, b"key", 5, None)]
|
225 | 196 |
|
226 |
| - def test_self_join_not_supported(self, topic_manager_topic_factory, create_sdf): |
227 |
| - topic = topic_manager_topic_factory() |
228 |
| - match = ( |
229 |
| - "Joining dataframes originating from the same topic is not yet supported." |
230 |
| - ) |
231 |
| - |
232 |
| - # The very same sdf object |
233 |
| - sdf = create_sdf(topic) |
234 |
| - with pytest.raises(ValueError, match=match): |
235 |
| - sdf.join_asof(sdf) |
236 |
| - |
237 |
| - # Same topic, different branch |
238 |
| - sdf2 = sdf.apply(lambda v: v) |
239 |
| - with pytest.raises(ValueError, match=match): |
240 |
| - sdf.join_asof(sdf2) |
241 |
| - |
242 | 197 | def test_join_same_topic_multiple_times_fails(
|
243 | 198 | self, topic_manager_topic_factory, create_sdf
|
244 | 199 | ):
|
|
0 commit comments