diff --git a/lib/tool_shed/test/functional/conftest.py b/lib/tool_shed/test/functional/conftest.py index 37bcabc6d661..21172f8ff72e 100644 --- a/lib/tool_shed/test/functional/conftest.py +++ b/lib/tool_shed/test/functional/conftest.py @@ -1,16 +1,11 @@ import os from typing import ( - Any, Callable, - Dict, Generator, ) import pytest -from playwright.sync_api import ( - Browser, - BrowserContext, -) +from playwright.sync_api import Browser from ..base.browser import ShedBrowser from ..base.playwrightbrowser import PlaywrightShedBrowser @@ -23,8 +18,8 @@ def twill_browser() -> Generator[ShedBrowser, None, None]: yield TwillShedBrowser() -def playwright_browser(class_context: BrowserContext) -> Generator[ShedBrowser, None, None]: - page = class_context.new_page() +def playwright_browser(browser: Browser) -> Generator[ShedBrowser, None, None]: + page = browser.new_page() yield PlaywrightShedBrowser(page) @@ -35,15 +30,3 @@ def playwright_browser(class_context: BrowserContext) -> Generator[ShedBrowser, shed_browser = pytest.fixture(scope="class")(playwright_browser) else: raise ValueError(f"Unrecognized value for TOOL_SHED_TEST_BROWSER: {test_browser}") - - -@pytest.fixture(scope="class") -def class_context( - browser: Browser, - browser_context_args: Dict, - pytestconfig: Any, - request: pytest.FixtureRequest, -) -> Generator[BrowserContext, None, None]: - from pytest_playwright.pytest_playwright import context - - yield from context.__pytest_wrapped__.obj(browser, browser_context_args, pytestconfig, request)