r"""Shortcut for .makefile() with a .py extension. Defaults to the test name with a '.py' extension, e.g test_foobar.py, overwriting existing files. Examples: .. code-block:: python def test_something(pytester): # Initial file is create
(self, *args: _FileContent, **kwargs: _FileContent)
| 867 | return self.makefile(".toml", pyproject=source) |
| 868 | |
| 869 | def makepyfile(self, *args: _FileContent, **kwargs: _FileContent) -> Path: |
| 870 | r"""Shortcut for .makefile() with a .py extension. |
| 871 | |
| 872 | Defaults to the test name with a '.py' extension, e.g test_foobar.py, overwriting |
| 873 | existing files. |
| 874 | |
| 875 | Examples: |
| 876 | |
| 877 | .. code-block:: python |
| 878 | |
| 879 | def test_something(pytester): |
| 880 | # Initial file is created test_something.py. |
| 881 | pytester.makepyfile("foobar") |
| 882 | # To create multiple files, pass kwargs accordingly. |
| 883 | pytester.makepyfile(custom="foobar") |
| 884 | # At this point, both 'test_something.py' & 'custom.py' exist in the test directory. |
| 885 | |
| 886 | """ |
| 887 | return self._makefile(".py", args, kwargs) |
| 888 | |
| 889 | def maketxtfile(self, *args: _FileContent, **kwargs: _FileContent) -> Path: |
| 890 | r"""Shortcut for .makefile() with a .txt extension. |
no test coverage detected