@@ -142,7 +142,6 @@ async def create_test_trade(
142142 return buy_order , sell_order
143143
144144
145- @pytest .mark .asyncio
146145async def test_create_and_get_order (set_up : dict [str , Any ]) -> None :
147146 """Test creating a gridpool order and ensure it exists in the system."""
148147 # Create an order first
@@ -157,7 +156,6 @@ async def test_create_and_get_order(set_up: dict[str, Any]) -> None:
157156 assert fetched_order .order == order .order , "Order mismatch"
158157
159158
160- @pytest .mark .asyncio
161159async def test_create_order_invalid_delivery_start_one_day_ago (
162160 set_up : dict [str , Any ]
163161) -> None :
@@ -174,7 +172,6 @@ async def test_create_order_invalid_delivery_start_one_day_ago(
174172 await create_test_order (set_up , delivery_period = delivery_period )
175173
176174
177- @pytest .mark .asyncio
178175async def test_create_order_invalid_delivery_start_one_hour_ago (
179176 set_up : dict [str , Any ]
180177) -> None :
@@ -191,7 +188,6 @@ async def test_create_order_invalid_delivery_start_one_hour_ago(
191188 await create_test_order (set_up , delivery_period = delivery_period )
192189
193190
194- @pytest .mark .asyncio
195191async def test_create_order_invalid_delivery_start_15_minutes_ago (
196192 set_up : dict [str , Any ]
197193) -> None :
@@ -208,7 +204,6 @@ async def test_create_order_invalid_delivery_start_15_minutes_ago(
208204 await create_test_order (set_up , delivery_period = delivery_period )
209205
210206
211- @pytest .mark .asyncio
212207async def test_create_order_invalid_valid_until_one_hour_ago (
213208 set_up : dict [str , Any ]
214209) -> None :
@@ -220,7 +215,6 @@ async def test_create_order_invalid_valid_until_one_hour_ago(
220215 await create_test_order (set_up , valid_until = valid_until )
221216
222217
223- @pytest .mark .asyncio
224218async def test_list_gridpool_orders (set_up : dict [str , Any ]) -> None :
225219 """Test listing gridpool orders and ensure they exist in the system."""
226220 # Create several orders
@@ -239,7 +233,6 @@ async def test_list_gridpool_orders(set_up: dict[str, Any]) -> None:
239233 assert order_id in listed_orders_id , f"Order ID { order_id } not found"
240234
241235
242- @pytest .mark .asyncio
243236async def test_update_order_price (set_up : dict [str , Any ]) -> None :
244237 """Test updating the price of an order."""
245238 # Create an order first
@@ -263,7 +256,6 @@ async def test_update_order_price(set_up: dict[str, Any]) -> None:
263256 ), "Original price should not be the same as the updated price"
264257
265258
266- @pytest .mark .asyncio
267259async def test_update_order_quantity_failure (set_up : dict [str , Any ]) -> None :
268260 """Test updating the quantity of an order and ensure it fails."""
269261 # Create an order first
@@ -283,7 +275,6 @@ async def test_update_order_quantity_failure(set_up: dict[str, Any]) -> None:
283275 ), "Expected INVALID_ARGUMENT error"
284276
285277
286- @pytest .mark .asyncio
287278async def test_cancel_order (set_up : dict [str , Any ]) -> None :
288279 """Test cancelling an order."""
289280 # Create the order to be cancelled
@@ -303,7 +294,6 @@ async def test_cancel_order(set_up: dict[str, Any]) -> None:
303294 ), "Order state should be CANCELED"
304295
305296
306- @pytest .mark .asyncio
307297async def test_update_cancelled_order_failure (set_up : dict [str , Any ]) -> None :
308298 """Test updating a cancelled order and ensure it fails."""
309299 # Create an order first
@@ -322,7 +312,6 @@ async def test_update_cancelled_order_failure(set_up: dict[str, Any]) -> None:
322312 ), "Expected INVALID_ARGUMENT error"
323313
324314
325- @pytest .mark .asyncio
326315async def test_cancel_all_orders (set_up : dict [str , Any ]) -> None :
327316 """Test cancelling all orders."""
328317 # Create multiple orders
@@ -345,7 +334,6 @@ async def test_cancel_all_orders(set_up: dict[str, Any]) -> None:
345334 ), f"Order { order .order_id } not canceled"
346335
347336
348- @pytest .mark .asyncio
349337async def test_list_gridpool_trades (set_up : dict [str , Any ]) -> None :
350338 """Test listing gridpool trades."""
351339 buy_order , sell_order = await create_test_trade (set_up )
@@ -359,7 +347,6 @@ async def test_list_gridpool_trades(set_up: dict[str, Any]) -> None:
359347 assert len (trades ) >= 1
360348
361349
362- @pytest .mark .asyncio
363350async def test_list_public_trades (set_up : dict [str , Any ]) -> None :
364351 """Test listing public trades."""
365352 delivery_period = DeliveryPeriod (
@@ -380,7 +367,6 @@ async def test_list_public_trades(set_up: dict[str, Any]) -> None:
380367 assert len (public_trades ) == 10 , "Failed to retrieve 10 public trades"
381368
382369
383- @pytest .mark .asyncio
384370async def test_stream_gridpool_orders (set_up : dict [str , Any ]) -> None :
385371 """Test streaming gridpool orders."""
386372 stream = await set_up ["client" ].stream_gridpool_orders (GRIDPOOL_ID )
@@ -397,7 +383,6 @@ async def test_stream_gridpool_orders(set_up: dict[str, Any]) -> None:
397383 pytest .fail ("Streaming timed out, no order received in 15 seconds" )
398384
399385
400- @pytest .mark .asyncio
401386async def test_stream_public_trades (set_up : dict [str , Any ]) -> None :
402387 """Test stream public trades."""
403388 stream = await set_up ["client" ].stream_public_trades ()
@@ -410,7 +395,6 @@ async def test_stream_public_trades(set_up: dict[str, Any]) -> None:
410395 pytest .fail ("Streaming timed out, no trade received in 15 seconds" )
411396
412397
413- @pytest .mark .asyncio
414398async def test_stream_gridpool_trades (set_up : dict [str , Any ]) -> None :
415399 """Test stream gridpool trades."""
416400 stream = await set_up ["client" ].stream_gridpool_trades (GRIDPOOL_ID )
@@ -426,23 +410,20 @@ async def test_stream_gridpool_trades(set_up: dict[str, Any]) -> None:
426410 pytest .fail ("Streaming timed out, no trade received in 15 seconds" )
427411
428412
429- @pytest .mark .asyncio
430413async def test_create_order_zero_quantity (set_up : dict [str , Any ]) -> None :
431414 """Test creating an order with zero quantity."""
432415 zero_quantity = Power (mw = Decimal ("0" ))
433416 with pytest .raises (ValueError , match = "Quantity must be strictly positive" ):
434417 await create_test_order (set_up , quantity = zero_quantity )
435418
436419
437- @pytest .mark .asyncio
438420async def test_create_order_negative_quantity (set_up : dict [str , Any ]) -> None :
439421 """Test creating an order with a negative quantity."""
440422 negative_quantity = Power (mw = Decimal ("-0.1" ))
441423 with pytest .raises (ValueError , match = "Quantity must be strictly positive" ):
442424 await create_test_order (set_up , quantity = negative_quantity )
443425
444426
445- @pytest .mark .asyncio
446427async def test_create_order_maximum_price_precision_exceeded (
447428 set_up : dict [str , Any ]
448429) -> None :
@@ -452,7 +433,6 @@ async def test_create_order_maximum_price_precision_exceeded(
452433 await create_test_order (set_up , price = excessive_precision_price )
453434
454435
455- @pytest .mark .asyncio
456436async def test_create_order_maximum_quantity_precision_exceeded (
457437 set_up : dict [str , Any ]
458438) -> None :
@@ -464,7 +444,6 @@ async def test_create_order_maximum_quantity_precision_exceeded(
464444 await create_test_order (set_up , quantity = excessive_precision_quantity )
465445
466446
467- @pytest .mark .asyncio
468447async def test_cancel_non_existent_order (set_up : dict [str , Any ]) -> None :
469448 """Test canceling a non-existent order and expecting an error."""
470449 non_existent_order_id = 999999
@@ -475,7 +454,6 @@ async def test_cancel_non_existent_order(set_up: dict[str, Any]) -> None:
475454 ), "Cancelling non-existent order should return an error"
476455
477456
478- @pytest .mark .asyncio
479457async def test_cancel_already_cancelled_order (set_up : dict [str , Any ]) -> None :
480458 """Test cancelling an order twice to ensure idempotent behavior."""
481459 order = await create_test_order (set_up )
@@ -489,7 +467,6 @@ async def test_cancel_already_cancelled_order(set_up: dict[str, Any]) -> None:
489467 ), "Order is already cancelled"
490468
491469
492- @pytest .mark .asyncio
493470async def test_create_order_with_invalid_delivery_area (set_up : dict [str , Any ]) -> None :
494471 """Test creating an order with an invalid delivery area code."""
495472 invalid_delivery_area = DeliveryArea (
@@ -511,7 +488,6 @@ async def test_create_order_with_invalid_delivery_area(set_up: dict[str, Any]) -
511488 ), "Delivery area not found"
512489
513490
514- @pytest .mark .asyncio
515491async def test_create_order_below_minimum_quantity (set_up : dict [str , Any ]) -> None :
516492 """Test creating an order with a quantity below the minimum allowed."""
517493 below_min_quantity = Power (mw = MIN_QUANTITY_MW - Decimal ("0.01" ))
@@ -521,7 +497,6 @@ async def test_create_order_below_minimum_quantity(set_up: dict[str, Any]) -> No
521497 await create_test_order (set_up , quantity = below_min_quantity )
522498
523499
524- @pytest .mark .asyncio
525500async def test_create_order_above_maximum_price (set_up : dict [str , Any ]) -> None :
526501 """Test creating an order with a price above the maximum allowed."""
527502 above_max_price = Price (amount = MAX_PRICE + Decimal ("0.01" ), currency = Currency .EUR )
@@ -531,7 +506,6 @@ async def test_create_order_above_maximum_price(set_up: dict[str, Any]) -> None:
531506 await create_test_order (set_up , price = above_max_price )
532507
533508
534- @pytest .mark .asyncio
535509async def test_create_order_at_maximum_price (set_up : dict [str , Any ]) -> None :
536510 """Test creating an order with the exact maximum allowed price."""
537511 max_price = Price (amount = MAX_PRICE , currency = Currency .EUR )
@@ -541,7 +515,6 @@ async def test_create_order_at_maximum_price(set_up: dict[str, Any]) -> None:
541515 ), "Order with maximum price was not created correctly"
542516
543517
544- @pytest .mark .asyncio
545518async def test_create_order_at_minimum_quantity_and_price (
546519 set_up : dict [str , Any ]
547520) -> None :
@@ -557,7 +530,6 @@ async def test_create_order_at_minimum_quantity_and_price(
557530 ), "Order with minimum price was not created correctly"
558531
559532
560- @pytest .mark .asyncio
561533async def test_update_order_to_invalid_price (set_up : dict [str , Any ]) -> None :
562534 """Test updating an order to have a price outside the valid range."""
563535 order = await create_test_order (set_up )
@@ -570,7 +542,6 @@ async def test_update_order_to_invalid_price(set_up: dict[str, Any]) -> None:
570542 )
571543
572544
573- @pytest .mark .asyncio
574545async def test_concurrent_cancel_and_update_order (set_up : dict [str , Any ]) -> None :
575546 """Test concurrent cancellation and update of the same order."""
576547 order = await create_test_order (set_up )
@@ -589,7 +560,6 @@ async def test_concurrent_cancel_and_update_order(set_up: dict[str, Any]) -> Non
589560 ), "Order is already cancelled"
590561
591562
592- @pytest .mark .asyncio
593563async def test_multiple_streams_different_filters (set_up : dict [str , Any ]) -> None :
594564 """Test creating multiple streams with different filters and ensure independent operation."""
595565 area_1 = DeliveryArea (
0 commit comments