diff --git a/changelog/5669.doc.rst b/changelog/5669.doc.rst new file mode 100644 index 000000000..0ec9626ae --- /dev/null +++ b/changelog/5669.doc.rst @@ -0,0 +1 @@ +Add docstring for ``Testdir.copy_example``. diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index 2068761fa..eef876152 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -630,6 +630,12 @@ class Testdir: return p def copy_example(self, name=None): + """Copy file from project's directory into the testdir. + + :param str name: The name of the file for copy. + :return: self.tmpdir + + """ import warnings from _pytest.warning_types import PYTESTER_COPY_EXAMPLE