Change py_config scope to `function`
See original GitHub issueProblem
There isn’t a record as to why this was changed to a session
scope. Ideally, this should have the function
scope so each test has its own config.
Potential Solution(s)
Change the scope to function
@pytest.fixture(scope='function')
def py_config(project_root, request) -> PyleniumConfig:
""" Initialize a PyleniumConfig for each test
1. This starts by deserializing the user-created pylenium.json from the Project Root.
2. If that file is not found, then proceed with Pylenium Defaults.
3. Then any CLI arguments override their respective key/values.
"""
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Change the scope of a function in Python - Stack Overflow
My goal is to change the scope of a function to a dictionary, instead of where it is defined, so that the function...
Read more >pyconfigure 0.2.1 - GNU.org
This method has the advantage of being language-agnostic, very flexible, ... already has a setup.py script, there is no need to replace it...
Read more >sys — System-specific parameters and functions — Python ...
This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter.
Read more >Function Scope :: Learn Python by Nina Zakharenko
Inside of a function in Python, the scope changes. Think about it this way: scoping in Python happens with whitespace. When we delineate...
Read more >Path of pyconfig.h in pyenv venv is outside of excpected scope
When using pyinstaller within a pyenv virtualenv, _find_prefix raises an error. The error is linked to pyconfig.h not being properly located ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Already did. See https://github.com/ElSnoMan/pyleniumio/pull/247 🙂
Resolved in
pyleniumio, v1.15.2+