pytest -> How to use fixture return value in test method under a class
问题 I have a fixture that returns a value like this: import pytest @pytest.yield_fixture(scope="module") def oneTimeSetUp(browser): print("Running one time setUp") if browser == 'firefox': driver = webdriver.Firefox() print("Running tests on FF") else: driver = webdriver.Chrome() print("Running tests on chrome") yield driver print("Running one time tearDown") This fixture gets the browser value from another fixture which is reading the command line option. Then I have a test class where I have