From f652292e02b909f95096b895c520c26a2b83d45f Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 14 Feb 2024 09:19:52 +0000 Subject: [PATCH] chore(trading): add missed vega cleanup (#5794) --- apps/trading/e2e/tests/perpetual_market/test_perpetuals.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/trading/e2e/tests/perpetual_market/test_perpetuals.py b/apps/trading/e2e/tests/perpetual_market/test_perpetuals.py index 799a760ba..89bbb38f3 100644 --- a/apps/trading/e2e/tests/perpetual_market/test_perpetuals.py +++ b/apps/trading/e2e/tests/perpetual_market/test_perpetuals.py @@ -4,7 +4,7 @@ from playwright.sync_api import Page, expect from vega_sim.null_service import VegaServiceNull from vega_sim.service import MarketStateUpdateType from datetime import datetime, timedelta -from conftest import init_vega +from conftest import init_vega, cleanup_container from actions.utils import change_keys from actions.vega import submit_multiple_orders from fixtures.market import setup_perps_market @@ -17,8 +17,9 @@ col_amount = '[col-id="amount"]' class TestPerpetuals: @pytest.fixture(scope="class") def vega(self, request): - with init_vega(request) as vega: - yield vega + with init_vega(request) as vega_instance: + request.addfinalizer(lambda: cleanup_container(vega_instance)) # Register the cleanup function + yield vega_instance @pytest.fixture(scope="class") def perps_market(self, vega: VegaServiceNull):