question-mark
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.

Session scope - argparsing a config object

See original GitHub issue

Hi,

I’m using a paramer for parsing args a global dictionary that hold configs. The config is used to hold IPs of several components which acts as an endpoint for the given application.

I would like to use Tavern to request the values but I don’t know how to do that.

any ideas?

the config looks like the following:

cfg = {
          'componenet_a': 'x.x.x.x',
           'componenet_b': 'y.y.y.y'
} 

– EDIT: found a way to return the config object. I just left with how should I access nested value.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelboultoncommented, Mar 17, 2019

The box library is a requirement of tavern so it should be present in your environment already

0reactions
michaelboultoncommented, Mar 23, 2019

Going to close this as the original issue now seems to be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Config' object has no attribute 'fault_handler_stderr' when ...
As a workaround, -p no:faulthandler can be used. It looks like pytest_configure in faulthandler.py exits early if it's already enabled: pytest ...
Read more >
Spring define a bean in session scope with java config
I tried to use @Scope("session") on the Person bean, in this case I did not use the @ScopedProxy annotation in appconfig and used...
Read more >
Source code for _pytest.fixtures
It is called for Session scope first and performs sorting # down to the ... def config(self) -> Config: """The pytest config object...
Read more >
pytest Documentation
config (Config) – The pytest config object. ... If you decide that you rather want to have a session-scoped smtp_connection instance, ...
Read more >
Reference — pytest documentation
Similar to caught exception objects in Python, explicitly clearing local references to returned ... Session-scoped fixture that returns the _pytest.config.
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found