':param testdir: the instance of Testdir class, a temporary
test directory.'

def test_parametrize_ids_exception(self, testdir):

    testdir.makepyfile('\n                                                                import    pytest\n\n                                                                def    ids(arg):\n                                                                                raise    Exception("bad    ids")\n\n                                                                @pytest.mark.parametrize("arg",    ["a",    "b"],    ids=ids)\n                                                                def    test_foo(arg):\n                                                                                pass\n                                                ')
    with pytest.warns(DeprecationWarning):
        result = testdir.runpytest('--collect-only')
    result.stdout.fnmatch_lines(["<Module    'test_parametrize_ids_exception.py'>", "        <Function    'test_foo[a]'>", "        <Function    'test_foo[b]'>"])
