Самый читаемый способ - вернуть namedtuple
в приборе:
from collections import namedtuple
import somefile
import pytest
@pytest.fixture()
def setup():
dictionary, dataframe = somefile.get_Di_And_Df()
return namedtuple("Setup", "dictionary dataframe")(dictionary, dataframe)
def test_check(setup):
assert setup.dictionary['movie']['action'] == 'Avengers'
assert setup.dataframe.shape[0] == 5