Skip to content

Commit

Permalink
test: remove redundant assertion and simplify output checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdolfoVillalobos committed Aug 30, 2024
1 parent 2790dd3 commit 98f7655
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/e2e/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,9 @@ def test_e2e_single_streaming():
if line:
outputs.append(json.loads(line.decode('utf-8')))

assert len(outputs) > 1, "Expected multiple streamed outputs"
assert len(outputs) == 3, "Expected 3 streamed outputs"
assert outputs[-1] == {"output": 12.0}, "Final output doesn't match expected value"

# Check that the outputs are incrementally building up to the final result
for i, output in enumerate(outputs[:-1]):
assert 0 < output["output"] <= 12.0, f"Intermediate output {i} is not within expected range"
if i > 0:
assert output["output"] >= outputs[i-1]["output"], "Outputs are not monotonically increasing"
expected_values = [4.0, 8.0, 12.0]
for i, output in enumerate(outputs):
assert output["output"] == expected_values[i], f"Intermediate output {i} is not expected value"

0 comments on commit 98f7655

Please sign in to comment.