@@ -375,7 +375,7 @@ Fixtures are reusable
375
375
^^^^^^^^^^^^^^^^^^^^^
376
376
377
377
One of the things that makes pytest's fixture system so powerful, is that it
378
- gives us the abilty to define a generic setup step that can reused over and
378
+ gives us the ability to define a generic setup step that can reused over and
379
379
over, just like a normal function would be used. Two different tests can request
380
380
the same fixture and have pytest give each test their own result from that
381
381
fixture.
@@ -902,7 +902,7 @@ attempt to tear them down as it normally would.
902
902
2. Adding finalizers directly
903
903
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
904
904
905
- While yield fixtures are considered to be the cleaner and more straighforward
905
+ While yield fixtures are considered to be the cleaner and more straightforward
906
906
option, there is another choice, and that is to add "finalizer" functions
907
907
directly to the test's `request-context `_ object. It brings a similar result as
908
908
yield fixtures, but requires a bit more verbosity.
@@ -1026,7 +1026,7 @@ making one state-changing action each, and then bundling them together with
1026
1026
their teardown code, as :ref: `the email examples above <yield fixtures >` showed.
1027
1027
1028
1028
The chance that a state-changing operation can fail but still modify state is
1029
- neglibible , as most of these operations tend to be `transaction `_-based (at
1029
+ negligible , as most of these operations tend to be `transaction `_-based (at
1030
1030
least at the level of testing where state could be left behind). So if we make
1031
1031
sure that any successful state-changing action gets torn down by moving it to a
1032
1032
separate fixture function and separating it from other, potentially failing
@@ -1124,7 +1124,7 @@ never have been made.
1124
1124
.. _`conftest.py` :
1125
1125
.. _`conftest` :
1126
1126
1127
- Fixture availabiility
1127
+ Fixture availability
1128
1128
---------------------
1129
1129
1130
1130
Fixture availability is determined from the perspective of the test. A fixture
@@ -1410,9 +1410,9 @@ pytest doesn't know where ``c`` should go in the case, so it should be assumed
1410
1410
that it could go anywhere between ``g `` and ``b ``.
1411
1411
1412
1412
This isn't necessarily bad, but it's something to keep in mind. If the order
1413
- they execute in could affect the behavior a test is targetting , or could
1413
+ they execute in could affect the behavior a test is targeting , or could
1414
1414
otherwise influence the result of a test, then the order should be defined
1415
- explicitely in a way that allows pytest to linearize/"flatten" that order.
1415
+ explicitly in a way that allows pytest to linearize/"flatten" that order.
1416
1416
1417
1417
.. _`autouse order` :
1418
1418
@@ -1506,7 +1506,7 @@ of what we've gone over so far.
1506
1506
1507
1507
All that's needed is stepping up to a larger scope, then having the **act **
1508
1508
step defined as an autouse fixture, and finally, making sure all the fixtures
1509
- are targetting that highler level scope.
1509
+ are targeting that higher level scope.
1510
1510
1511
1511
Let's pull :ref: `an example from above <safe fixture structure >`, and tweak it a
1512
1512
bit. Let's say that in addition to checking for a welcome message in the header,
@@ -1777,7 +1777,7 @@ Parametrizing fixtures
1777
1777
-----------------------------------------------------------------
1778
1778
1779
1779
Fixture functions can be parametrized in which case they will be called
1780
- multiple times, each time executing the set of dependent tests, i. e. the
1780
+ multiple times, each time executing the set of dependent tests, i.e. the
1781
1781
tests that depend on this fixture. Test functions usually do not need
1782
1782
to be aware of their re-running. Fixture parametrization helps to
1783
1783
write exhaustive functional tests for components which themselves can be
0 commit comments