From e0ce8b79d5bb6d1114201ce5d85fd6f02948e325 Mon Sep 17 00:00:00 2001 From: martbln Date: Sat, 10 Aug 2019 00:55:39 +0300 Subject: [PATCH 1/2] 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 00000000000..0ec9626ae50 --- /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 2068761faf9..eef87615253 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -630,6 +630,12 @@ def mkpydir(self, name): 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 From ee936b27a8bda9e46af327ce093c209463b488ab Mon Sep 17 00:00:00 2001 From: Ilya Stepin Date: Sat, 10 Aug 2019 09:12:04 +0300 Subject: [PATCH 2/2] pytester: fix docstrings Co-Authored-By: Bruno Oliveira --- src/_pytest/pytester.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index eef87615253..29c200ce6dc 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -633,7 +633,7 @@ 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 + :return: path to the copied directory (inside ``self.tmpdir``). """ import warnings