Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maurerle committed Nov 9, 2024
1 parent bbb7f09 commit cdf00f0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test_simple_market.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cdf00f0

Please sign in to comment.