From cbad31973641af61da06b9a2efc10a1eb6faf197 Mon Sep 17 00:00:00 2001 From: ParetoLife Date: Mon, 27 Jan 2020 10:50:05 +0100 Subject: [PATCH] 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. --- doc/en/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 `, 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 `, 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