Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change py_config scope to `function`

See original GitHub issue


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

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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

rnestlercommented, Apr 6, 2022

Do you want to give it a try?

Already did. See 🙂

ElSnoMancommented, Apr 7, 2022

Resolved in pyleniumio, v1.15.2+

Read more comments on GitHub >

github_iconTop 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 -
This method has the advantage of being language-agnostic, very flexible, ... already has a 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found