doc: getting-started.rst: mention "Test" prefix for classes (#6583)
doc: getting-started.rst: mention "Test" prefix for classes
This commit is contained in:
commit
8c41236c66
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue