title: How to access a pytest built-in fixture from a fixture with scope other than 'function'?
body: <p>I have read the docs about fixtures a few times and I believe I understand scope:<br>
  <a href="https://docs.pytest.org/en/6.2.x/fixture.html" rel="nofollow noreferrer">https://docs.pytest.org/en/6.2.x/fixture.html</a></p>
  <p>I have noticed that all the builtin fixtures I want to use are function scoped, for example:
  capdf, capsys, monkeypatch, etc...</p>
  <p>That pytest documentation above encourages more of the &quot;act step&quot; to be pushed into fixtures instead of test functions.</p>
  <p>Doing that without drastically increasing the time required for my tests seems to require the other scopes beyond the &quot;function&quot; scope.</p>
  <p>But the builtin fixtures do not work in other scopes.
  Have I missed a way to use them in other scopes?</p>
  <p>Example:</p>
  <pre class="lang-py prettyprint-override"><code>@pytest.fixture(scope=&quot;class&quot;)
  def my_fixture(capfd):
      # ... use capfd to capture stdout
      pass
  </code></pre>
  <p>This causes an error:</p>
  <pre><code>ScopeMismatch: You tried to access the function scoped fixture capfd with a class scoped request object
  </code></pre>
  <p>See this workaround for monkeypatch specifically:<br>
  <a href="https://github.com/pytest-dev/pytest/issues/363#issuecomment-406536200" rel="nofollow noreferrer">https://github.com/pytest-dev/pytest/issues/363#issuecomment-406536200</a></p>
  <p><strong>Is a workaround like this possible for capfd or for all builtin fixtures?</strong></p>
  <p>For instance, could one make a capfd_session fixture that uses the CaptureFixture class?
  Would doing so be inadvisable because it requires going past the API of pytest and these details could be subject to change in a future update?</p>