'Test the gethookproxy function(#2016)'

def test_hook_proxy(self, testdir):

    config = testdir.parseconfig()
    session = Session(config)
    testdir.makepyfile(**{'tests/conftest.py': '', 'tests/subdir/conftest.py': ''})
    conftest1 = testdir.tmpdir.join('tests/conftest.py')
    conftest2 = testdir.tmpdir.join('tests/subdir/conftest.py')
    config.pluginmanager._importconftest(conftest1)
    ihook_a = session.gethookproxy(testdir.tmpdir.join('tests'))
    assert (ihook_a is not None)
    config.pluginmanager._importconftest(conftest2)
    ihook_b = session.gethookproxy(testdir.tmpdir.join('tests'))
    assert (ihook_a is not ihook_b)
