pytester.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:hostapd-mana 作者: adde88 项目源码 文件源码
def makefile(self, ext, *args, **kwargs):
        """Create a new file in the testdir.

        ext: The extension the file should use, including the dot.
           E.g. ".py".

        args: All args will be treated as strings and joined using
           newlines.  The result will be written as contents to the
           file.  The name of the file will be based on the test
           function requesting this fixture.
           E.g. "testdir.makefile('.txt', 'line1', 'line2')"

        kwargs: Each keyword is the name of a file, while the value of
           it will be written as contents of the file.
           E.g. "testdir.makefile('.ini', pytest='[pytest]\naddopts=-rs\n')"

        """
        return self._makefile(ext, args, kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号