title: Pytest dynamic fixture scope - how to set and will the fixture scope apply to all tests?
body: <p>I am trying to use pytest fixtures dynamic scoping.
  The docs state that the scope will be determined during fixture definition; does it mean that once the scope is dynamically set in pytest run , this scope will apply to all tests using the fixture?
  Is it possible to affect the scope during the test run (i.e using markers)?
  If not, how can I change the config (without using a command line arg) to change the scope?</p>
  
  <p>I tried to add a marker and use its value as a scope in pytest_generate_tests, however fixture definition runs prior to pytest_generate_tests.</p>
  
  <pre><code>def pytest_generate_tests(metafunc):
      fixture_scope = metafunc.definition.get_closest_marker('scope').args
      if fixture_scope is not None:
          metafunc.config.addinivalue_line('markers', f'scope:{fixture_scope[0]}')
  
  
  def determine_scope(fixture_name, config):
      scope = [i for i in config.getini('markers') if 'scope' in i][0]
      if scope:
          return scope.split(':')[-1]
      return "function"
  
  
  @pytest.fixture(scope=determine_scope)
  def some_fixture():
  </code></pre>