Skip to content

Commit e0ce8b7

Browse files
committed
pytester: add docstrings for Testdir.copy_example
1 parent 5ecac3c commit e0ce8b7

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: self.tmpdir
637+
638+
"""
633639
import warnings
634640
from _pytest.warning_types import PYTESTER_COPY_EXAMPLE
635641

0 commit comments

Comments
 (0)