def test_collect_functools_partial(testdir):
 testdir.makepyfile("\n        import functools\n        import pytest\n\n        @pytest.fixture\n        def fix1():\n            return 'fix1'\n\n        @pytest.fixture\n        def fix2():\n            return 'fix2'\n\n        def check1(i, fix1):\n            assert i == 2\n            assert fix1 == 'fix1'\n\n        def check2(fix1, i):\n            assert i == 2\n            assert fix1 == 'fix1'\n\n        def check3(fix1, i, fix2):\n            assert i == 2\n            assert fix1 == 'fix1'\n            assert fix2 == 'fix2'\n\n        test_ok_1 = functools.partial(check1, i=2)\n        test_ok_2 = functools.partial(check1, i=2, fix1='fix1')\n        test_ok_3 = functools.partial(check1, 2)\n        test_ok_4 = functools.partial(check2, i=2)\n        test_ok_5 = functools.partial(check3, i=2)\n        test_ok_6 = functools.partial(check3, i=2, fix1='fix1')\n\n        test_fail_1 = functools.partial(check2, 2)\n        test_fail_2 = functools.partial(check3, 2)\n    ")
 result = testdir.inline_run()
 result.assertoutcome(passed=6, failed=2)

def test_collect_functools_partial ( testdir ) : testdir . makepyfile ( "\n        import functools\n        import pytest\n\n        @pytest.fixture\n        def fix1():\n            return 'fix1'\n\n        @pytest.fixture\n        def fix2():\n            return 'fix2'\n\n        def check1(i, fix1):\n            assert i == 2\n            assert fix1 == 'fix1'\n\n        def check2(fix1, i):\n            assert i == 2\n            assert fix1 == 'fix1'\n\n        def check3(fix1, i, fix2):\n            assert i == 2\n            assert fix1 == 'fix1'\n            assert fix2 == 'fix2'\n\n        test_ok_1 = functools.partial(check1, i=2)\n        test_ok_2 = functools.partial(check1, i=2, fix1='fix1')\n        test_ok_3 = functools.partial(check1, 2)\n        test_ok_4 = functools.partial(check2, i=2)\n        test_ok_5 = functools.partial(check3, i=2)\n        test_ok_6 = functools.partial(check3, i=2, fix1='fix1')\n\n        test_fail_1 = functools.partial(check2, 2)\n        test_fail_2 = functools.partial(check3, 2)\n    " ) result = testdir . inline_run ( ) result . assertoutcome ( passed = 6 , failed = 2 )
test that collection of functools .