dash_duo: allow for dynamic scoping
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the dash_duo pytest fixture and its existing fixture-scope configuration. Read pytest's dynamic-scope documentation and inspect how the fixture is used by tests. Done means module-scoped requests can use dash_duo without ScopeMismatch while existing function-scoped behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100