def store_expected_values(request):
    """
    Stores expected values to be retrieved by the expected_values fixture
    Note1: Numpy arrays MUST be converted to list before being stored as json
    Note2: It's possible to store both a framework independent and framework specific value. If both are stored the
    framework specific value will be used
    :param request:
    :return:
    """

    def _store_expected_values(values_to_store, framework=""):

        framework_name = framework
        if framework_name:
            framework_name = "_" + framework_name

        file_name = request.node.location[0].split("/")[-1][:-3] + ".json"

        try:
            with open(
                os.path.join(os.path.dirname(__file__), os.path.dirname(request.node.location[0]), file_name), "r"
            ) as f:
                expected_values = json.load(f)
        except FileNotFoundError:
            expected_values = {}

        test_name = request.node.name + framework_name
        expected_values[test_name] = values_to_store

        with open(
                os.path.join(os.path.dirname(__file__), os.path.dirname(request.node.location[0]), file_name), "w"
        ) as f:
            json.dump(expected_values, f, indent=4)

    return _store_expected_values

    Stores expected values to be retrieved by the expected_values fixture
    Note1: Numpy arrays MUST be converted to list before being stored as json
    Note2: It's possible to store both a framework independent and framework specific value. If both are stored the
    framework specific value will be used
    :param request:
    :return:
    
conftest.py