From e0ce8b79d5bb6d1114201ce5d85fd6f02948e325 Mon Sep 17 00:00:00 2001 From: martbln Date: Sat, 10 Aug 2019 00:55:39 +0300 Subject: [PATCH] pytester: add docstrings for Testdir.copy_example --- changelog/5669.doc.rst | 1 + src/_pytest/pytester.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 changelog/5669.doc.rst 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