Skip to content

Commit f7e81da

Browse files
authored
5669: pytester: add docstrings for Testdir.copy_example (#5719)
5669: pytester: add docstrings for Testdir.copy_example
2 parents 8ffa3aa + ee936b2 commit f7e81da

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

changelog/5669.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add docstring for ``Testdir.copy_example``.

src/_pytest/pytester.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,12 @@ def mkpydir(self, name):
630630
return p
631631

632632
def copy_example(self, name=None):
633+
"""Copy file from project's directory into the testdir.
634+
635+
:param str name: The name of the file for copy.
636+
:return: path to the copied directory (inside ``self.tmpdir``).
637+
638+
"""
633639
import warnings
634640
from _pytest.warning_types import PYTESTER_COPY_EXAMPLE
635641

0 commit comments

Comments
 (0)