Add better text for task integration test assertions

This commit is contained in:
Leon Luithlen 2024-11-12 14:47:57 +01:00
parent d01061d88a
commit a5411256c2
2 changed files with 6 additions and 4 deletions

View file

@ -33,8 +33,9 @@ async def run_and_check_tasks():
results = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23]
index = 0
async for result in pipeline:
print(result)
assert result == results[index]
assert (
result == results[index]
), f"at {index = }: {result = } != {results[index] = }"
index += 1

View file

@ -31,8 +31,9 @@ async def pipeline(data_queue):
results = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
index = 0
async for result in tasks_run:
print(result)
assert result == results[index]
assert (
result == results[index]
), f"at {index = }: {result = } != {results[index] = }"
index += 1