From 552e5d6b1e4ea0d8cd5af2f7d2f6b1f488475d4d Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Wed, 14 Feb 2024 10:17:52 +0100 Subject: [PATCH] fix tests --- tests/test_policies.py | 2 +- tests/test_policies_contracts.py | 2 +- tests/test_simple_market_mechanisms.py | 7 +++++-- tests/test_utils.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_policies.py b/tests/test_policies.py index 0a1dbf039..142419504 100644 --- a/tests/test_policies.py +++ b/tests/test_policies.py @@ -51,7 +51,7 @@ def handle_message(self, content, meta): async def test_request_messages(): market_name = "Test" marketconfig = MarketConfig( - name=market_name, + market_id=market_name, opening_hours=rr.rrule(rr.HOURLY, dtstart=start, until=end), opening_duration=rd(hours=1), market_mechanism="pay_as_clear", diff --git a/tests/test_policies_contracts.py b/tests/test_policies_contracts.py index c055caf77..5fc664f96 100644 --- a/tests/test_policies_contracts.py +++ b/tests/test_policies_contracts.py @@ -31,7 +31,7 @@ def test_contract_functions(): index = pd.date_range( start=start, end=end, - freq="H", + freq="h", ) contract = { diff --git a/tests/test_simple_market_mechanisms.py b/tests/test_simple_market_mechanisms.py index 851976267..93913535f 100644 --- a/tests/test_simple_market_mechanisms.py +++ b/tests/test_simple_market_mechanisms.py @@ -63,9 +63,12 @@ def test_market(): async def test_simple_market_mechanism(): for name, role in clearing_mechanisms.items(): - for skip_name in ["complex", "redispatch"]: + skip = False + for skip_name in ["complex", "redispatch", "contract"]: if skip_name in name: - continue + skip = True + if skip: + continue print(name) market_config = copy.copy(simple_dayahead_auction_config) diff --git a/tests/test_utils.py b/tests/test_utils.py index da12f4791..1d774321b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -279,7 +279,7 @@ def test_plot_function(mock_pyplot): @patch("matplotlib.pyplot.show") -def test_plot_function(mock_pyplot): +def test_visualize_function(mock_pyplot): orderbook = create_orderbook() i = -1 for o in orderbook: