summaryrefslogtreecommitdiff
path: root/doc/en/getting-started.rst
diff options
context:
space:
mode:
authorParetoLife <f.d.andriessen@gmail.com>2020-01-27 10:50:05 +0100
committerGitHub <noreply@github.com>2020-01-27 10:50:05 +0100
commitcbad31973641af61da06b9a2efc10a1eb6faf197 (patch)
tree88f2e1fd1e5d87ab85086ccb6bc8806885885a01 /doc/en/getting-started.rst
parenta9eab077397d0d56248145313cb6f9fe4b365770 (diff)
downloadpytest-cbad31973641af61da06b9a2efc10a1eb6faf197.tar.gz
Update getting-started.rst
From the description it seemed to me as if just prefixing your methods with ``test_`` was enough, but you also need to prefix your class with ``Test``. Of course, in the reference material this is clearly stated, but I think it makes sense to mention it here as well, since you also mention the part about the methods' prefix.
Diffstat (limited to 'doc/en/getting-started.rst')
-rw-r--r--doc/en/getting-started.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst
index 59197d0d7..83b4677e9 100644
--- a/doc/en/getting-started.rst
+++ b/doc/en/getting-started.rst
@@ -127,7 +127,7 @@ Once you develop multiple tests, you may want to group them into a class. pytest
x = "hello"
assert hasattr(x, "check")
-``pytest`` discovers all tests following its :ref:`Conventions for Python test discovery <test discovery>`, so it finds both ``test_`` prefixed functions. There is no need to subclass anything. We can simply run the module by passing its filename:
+``pytest`` discovers all tests following its :ref:`Conventions for Python test discovery <test discovery>`, so it finds both ``test_`` prefixed functions. There is no need to subclass anything, but make sure to prefix your class with ``Test`` otherwise the class will be skipped. We can simply run the module by passing its filename:
.. code-block:: pytest