def makeit(doctest):
    mode = request.param
    if (mode == 'text'):
        testdir.maketxtfile(doctest)
    else:
        assert (mode == 'module')
        testdir.makepyfile(('"""\n%s"""' % doctest))
def makeit(doctest):
    mode = request.param
    if (mode == 'text'):
        testdir.maketxtfile(doctest)
    else:
        assert (mode == 'module')
        testdir.makepyfile(('"\n%s"' % doctest))