File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -174,11 +174,15 @@ Or to select "http" and "quick" tests::
174
174
.. note ::
175
175
176
176
If you are using expressions such as ``"X and Y" `` then both ``X `` and ``Y ``
177
- need to be simple non-keyword names. For example, ``"pass" `` or ``"from" ``
178
- will result in SyntaxErrors because ``"-k" `` evaluates the expression using Python's ``eval `` function.
177
+ need to be simple non-keyword names. For example, ``"pass" `` or ``"from" ``
178
+ will result in SyntaxErrors because ``"-k" `` evaluates the expression using
179
+ Python's `eval `_ function.
180
+
181
+ .. _`eval` : https://docs.python.org/3.6/library/functions.html#eval
182
+
179
183
180
184
However, if the ``"-k" `` argument is a simple string, no such restrictions
181
- apply. Also ``"-k 'not STRING'" `` has no restrictions. You can also
185
+ apply. Also ``"-k 'not STRING'" `` has no restrictions. You can also
182
186
specify numbers like ``"-k 1.3" `` to match tests which are parametrized
183
187
with the float ``"1.3" ``.
184
188
Original file line number Diff line number Diff line change @@ -198,5 +198,5 @@ was executed ahead of the ``test_method``.
198
198
The above ``usefixtures `` and ``autouse `` examples should help to mix in
199
199
pytest fixtures into unittest suites.
200
200
201
- You can also consider incrementally leave away ``unittest.TestCase `` subclassing,
202
- using plain asserts and get the full pytest feature set.
201
+ You can also gradually move away from subclassing from ``unittest.TestCase ``
202
+ to * plain asserts * and the benefits from the full pytest feature set.
You can’t perform that action at this time.
0 commit comments