Skip to content

Commit 06904ea

Browse files
committed
Fix further e2e tests
1 parent 518becf commit 06904ea

File tree

2 files changed

+21
-29
lines changed

2 files changed

+21
-29
lines changed

tests/e2e/internal/retrieval/test_series.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
RunAttributeDefinition,
2222
fetch_series_values,
2323
)
24-
from tests.e2e.conftest import extract_pages
2524
from tests.e2e.data_ingestion import (
2625
File,
2726
Histogram,
@@ -179,17 +178,17 @@ def test_fetch_series_values_does_not_exist(client, project_1):
179178
)
180179

181180
# when
182-
series = extract_pages(
183-
fetch_series_values(
184-
client,
185-
[run_definition],
186-
include_inherited=False,
187-
container_type=ContainerType.EXPERIMENT,
188-
)
181+
series = fetch_series_values(
182+
client,
183+
[run_definition],
184+
include_inherited=False,
185+
container_type=ContainerType.EXPERIMENT,
189186
)
190187

191188
# then
192-
assert series == []
189+
assert series == {
190+
run_definition: [],
191+
}
193192

194193

195194
@dataclass

tests/e2e/internal/test_split.py

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,36 +185,29 @@ def test_fetch_string_series_values_retrieval(client, project, experiment_identi
185185
result = None
186186
thrown_e = None
187187
try:
188-
result = extract_pages(
189-
fetch_series_values(
190-
client,
191-
attribute_definitions,
192-
include_inherited=True,
193-
container_type=ContainerType.EXPERIMENT,
194-
step_range=(None, None),
195-
tail_limit=None,
196-
)
188+
result = fetch_series_values(
189+
client,
190+
attribute_definitions,
191+
include_inherited=True,
192+
container_type=ContainerType.EXPERIMENT,
193+
step_range=(None, None),
194+
tail_limit=None,
197195
)
198196
except (NeptuneRetryError, NeptuneUnexpectedResponseError) as e:
199197
thrown_e = e
200198

201199
# then
202200
if success:
203-
expected_values = [
204-
(
205-
RunAttributeDefinition(
206-
run_identifier=exp, attribute_definition=AttributeDefinition(key, "string_series")
207-
),
208-
[SeriesValue(1.0, value, int(NOW.timestamp() * 1000))],
209-
)
201+
expected_result = {
202+
RunAttributeDefinition(
203+
run_identifier=exp, attribute_definition=AttributeDefinition(key, "string_series")
204+
): [SeriesValue(1.0, value, int(NOW.timestamp() * 1000))]
210205
for exp in exp_identifiers
211206
for key, value in attribute_data.items()
212-
]
207+
}
213208

214209
assert thrown_e is None
215-
assert sorted(result, key=lambda r: (r[0].run_identifier.sys_id, r[0].attribute_definition.name)) == sorted(
216-
expected_values, key=lambda r: (r[0].run_identifier.sys_id, r[0].attribute_definition.name)
217-
)
210+
assert result == expected_result
218211
else:
219212
assert result is None
220213
assert thrown_e is not None

0 commit comments

Comments
 (0)