Skip to content

dash_duo: allow for dynamic scoping #1437

Open

Description

@VeraZab

Is your feature request related to a problem? Please describe.
when using dash_duo selenium test fixture with pytest, I'm facing this error: ScopeMismatch: You tried to access the 'function' scoped fixture 'dash_duo' with a 'module' scoped request object, involved factories
It arises as I'm trying to refactor my tests and only run certain expensive operations once (ie: authenticating to DE) per test module, rather than once per test function

Describe the solution you'd like
I see that it's possible to have fixture scope set dynamically: https://docs.pytest.org/en/stable/fixture.html#dynamic-scope and wondering if we could implement something like this for the dash_duo fixture

cc @Marc-Andre-Rivet @alexcjohnson

Activity

  1. VeraZab commented on Oct 16, 2020

    @VeraZab
    Author

    'dash_br' also has this issue of being function scoped, and its probably in my case the fixture I should be using as I just need a browser in my tests..

  2. added this to the maintenance milestone on Oct 23, 2020
  3. self-assigned this
    on Jul 18, 2024
  4. removed their assignment
    on Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions