def test_several_fixtures_in_parametrize_with_params(testdir):
    items = testdir.getitems("\n        import pytest\n        @pytest.fixture(params=[1,2])\n        def one(request):\n            return request.param\n        @pytest.fixture(params=[3,4])\n        def two(request):\n            return request.param\n        @pytest.mark.parametrize('arg1,arg2,arg3', [\n            ('val1', pytest.lazy_fixture('one'), pytest.lazy_fixture('two')),\n        ])\n        def test_func(arg1, arg2, arg3):\n            pass\n    ")
    assert (len(items) == 4)
    expected_results = [{'one': 1, 'two': 3}, {'one': 1, 'two': 4}, {'one': 2, 'two': 3}, {'one': 2, 'two': 4}]

    def is_subset(subset, superset):
        return all(((superset[k] == subset[k]) for k in subset))
    for item in items:
        assert any((is_subset(result, item.callspec.params) for result in expected_results))
def test_several_fixtures_in_parametrize_with_params(testdir):
    items = testdir.getitems("\n        import pytest\n        @pytest.fixture(params=[1,2])\n        def one(request):\n            return request.param\n        @pytest.fixture(params=[3,4])\n        def two(request):\n            return request.param\n        @pytest.mark.parametrize('arg1,arg2,arg3', [\n            ('val1', pytest.lazy_fixture('one'), pytest.lazy_fixture('two')),\n        ])\n        def test_func(arg1, arg2, arg3):\n            pass\n    ")
    assert (len(items) == 4)
    expected_results = [{'one': 1, 'two': 3}, {'one': 1, 'two': 4}, {'one': 2, 'two': 3}, {'one': 2, 'two': 4}]

    def is_subset(subset, superset):
        return all(((superset[k] == subset[k]) for k in subset))
    for item in items:
        assert any((is_subset(result, item.callspec.params) for result in expected_results))