How to have two issued fixtures depend on each other?
<p>In <code>test_something()</code>, the <code>app</code> instance should be the same as used by the <code>login</code> instance.</p>

<pre><code>@pytest.fixture
def app():
    # ...
    return app

@pytest.fixture
def login(app):
    # ...
    return login

def test_something(self, app, login):
    pass
</code></pre>

<p>What I tried is returning both objects from the second fixture, but I wouldn't call this idiomatic.</p>

<pre><code>@pytest.fixture
def app_and_login(app):
    # ...
    return app, login

def test_something(self, app_and_login):
    app, login = login_and_login
</code></pre>

<p>Is there a better way to do this?</p>