Apply modifications requested in review
This commit is contained in:
parent
6fe7069cbb
commit
7082320f3f
|
@ -175,7 +175,11 @@ Or to select "http" and "quick" tests::
|
||||||
|
|
||||||
If you are using expressions such as ``"X and Y"`` then both ``X`` and ``Y``
|
If you are using expressions such as ``"X and Y"`` then both ``X`` and ``Y``
|
||||||
need to be simple non-keyword names. For example, ``"pass"`` or ``"from"``
|
need to be simple non-keyword names. For example, ``"pass"`` or ``"from"``
|
||||||
will result in SyntaxErrors because ``"-k"`` evaluates the expression using Python's ``eval`` function.
|
will result in SyntaxErrors because ``"-k"`` evaluates the expression using
|
||||||
|
Python's `eval`_ function.
|
||||||
|
|
||||||
|
.. _`eval`: https://docs.python.org/3.6/library/functions.html#eval
|
||||||
|
|
||||||
|
|
||||||
However, if the ``"-k"`` argument is a simple string, no such restrictions
|
However, if the ``"-k"`` argument is a simple string, no such restrictions
|
||||||
apply. Also ``"-k 'not STRING'"`` has no restrictions. You can also
|
apply. Also ``"-k 'not STRING'"`` has no restrictions. You can also
|
||||||
|
|
|
@ -198,5 +198,5 @@ was executed ahead of the ``test_method``.
|
||||||
The above ``usefixtures`` and ``autouse`` examples should help to mix in
|
The above ``usefixtures`` and ``autouse`` examples should help to mix in
|
||||||
pytest fixtures into unittest suites.
|
pytest fixtures into unittest suites.
|
||||||
|
|
||||||
You can also consider incrementally leave away ``unittest.TestCase`` subclassing,
|
You can also gradually move away from subclassing from ``unittest.TestCase``
|
||||||
using plain asserts and get the full pytest feature set.
|
to *plain asserts* and the benefits from the full pytest feature set.
|
||||||
|
|
Loading…
Reference in New Issue