'Create a python file, similar to TestDir.makepyfile.'

def makepyfile(self, **kwargs):

    for (filename, data) in kwargs.items():
        text = textwrap.dedent(data)
        ((self._tmpdir / filename) + '.py').write_text(text, 'utf-8')
