From cdf00f0a91cc82c915ed19bd99f12b6ad116aaef Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Sat, 9 Nov 2024 02:37:17 +0100 Subject: [PATCH] fix tests --- tests/test_simple_market.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_simple_market.py b/tests/test_simple_market.py index df46ba5..bf9b697 100644 --- a/tests/test_simple_market.py +++ b/tests/test_simple_market.py @@ -51,12 +51,11 @@ def test_market(): orderbook = extend_orderbook(products, 900, 50, orderbook) mr = PayAsClearRole(simple_dayahead_auction_config) - accepted, rejected, meta = mr.clear(orderbook, products) + accepted, rejected, meta, _ = mr.clear(orderbook, products) assert meta[0]["demand_volume"] > 0 assert meta[0]["price"] > 0 import pandas as pd - print(pd.DataFrame(mr.all_orders)) print(pd.DataFrame(accepted)) print(meta) @@ -84,7 +83,7 @@ async def test_simple_market_mechanism(): orderbook = create_orderbook(order, node_ids=[0, 1, 2]) mr = role(simple_dayahead_auction_config) - accepted, rejected, meta = mr.clear(orderbook, products) + accepted, rejected, meta, _ = mr.clear(orderbook, products) assert meta[0]["supply_volume"] > 0 assert meta[0]["price"] > 0 # import pandas as pd @@ -114,7 +113,7 @@ def test_market_pay_as_clear(): orderbook = extend_orderbook(products, 200, 50, orderbook) mr = PayAsClearRole(simple_dayahead_auction_config) - accepted, rejected, meta = mr.clear(orderbook, products) + accepted, rejected, meta, _ = mr.clear(orderbook, products) assert meta[0]["demand_volume"] > 0 assert meta[0]["price"] > 0 assert len(accepted) == 4 @@ -144,7 +143,7 @@ def test_market_pay_as_clears_single_demand(): orderbook = extend_orderbook(products, 200, 50, orderbook) mr = PayAsClearRole(simple_dayahead_auction_config) - accepted, rejected, meta = mr.clear(orderbook, products) + accepted, rejected, meta, _ = mr.clear(orderbook, products) assert meta[0]["demand_volume"] > 0 assert meta[0]["price"] > 0 assert len(accepted) == 3 @@ -175,7 +174,7 @@ def test_market_pay_as_clears_single_demand_more_generation(): orderbook = extend_orderbook(products, 230, 60, orderbook) mr = PayAsClearRole(simple_dayahead_auction_config) - accepted, rejected, meta = mr.clear(orderbook, products) + accepted, rejected, meta, _ = mr.clear(orderbook, products) assert meta[0]["demand_volume"] > 0 assert meta[0]["price"] > 0 assert len(accepted) == 3