Skip to content

Commit ad34bae

Browse files
committed
Fix invalid Power constructor
`Power` must be always constructed using one of the `from_xxx()` methods. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent d8ebe7c commit ad34bae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmarks/power_distribution/power_distributor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def send_requests(batteries: set[int], request_num: int) -> list[Result]:
5555
result: list[Any] = []
5656
for _ in range(request_num):
5757
await battery_pool.propose_power(
58-
Power(float(random.randrange(100000, 1000000)))
58+
Power.from_watts(float(random.randrange(100000, 1000000)))
5959
)
6060
try:
6161
output = await asyncio.wait_for(results_rx.receive(), timeout=3)

0 commit comments

Comments
 (0)