'Test override of the autouse fixture with parametrized one on the conftest level.
This test covers the issue explained in issue 1601'

def test_override_autouse_fixture_with_parametrized_fixture_conftest_conftest(self, testdir):

    testdir.makeconftest("\n                                                import    pytest\n\n                                                @pytest.fixture(autouse=True)\n                                                def    spam():\n                                                                return    'spam'\n                                ")
    subdir = testdir.mkpydir('subdir')
    subdir.join('conftest.py').write(_pytest._code.Source('\n                                                import    pytest\n\n                                                @pytest.fixture(params=[1,    2,    3])\n                                                def    spam(request):\n                                                                return    request.param\n                                '))
    testfile = subdir.join('test_spam.py')
    testfile.write(_pytest._code.Source("\n                                                params    =    {'spam':    1}\n\n                                                def    test_spam(spam):\n                                                                assert    spam    ==    params['spam']\n                                                                params['spam']    +=    1\n                                "))
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(['*3    passed*'])
    result = testdir.runpytest(testfile)
    result.stdout.fnmatch_lines(['*3    passed*'])
