File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ Add documentation about the ``python -m pytest`` invocation adding the current directory to sys.path.
Original file line number Diff line number Diff line change @@ -68,4 +68,9 @@ imported in the global import namespace.
68
68
69
69
This is also discussed in details in :ref: `test discovery `.
70
70
71
+ Invoking ``pytest `` versus ``python -m pytest ``
72
+ -----------------------------------------------
71
73
74
+ Running pytest with ``python -m pytest [...] `` instead of ``pytest [...] `` yields nearly
75
+ equivalent behaviour, except that the former call will add the current directory to ``sys.path ``.
76
+ See also :ref: `cmdline `.
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ You can invoke testing through the Python interpreter from the command line::
17
17
python -m pytest [...]
18
18
19
19
This is almost equivalent to invoking the command line script ``pytest [...] ``
20
- directly, except that Python will also add the current directory to ``sys.path ``.
20
+ directly, except that calling via `` python `` will also add the current directory to ``sys.path ``.
21
21
22
22
Possible exit codes
23
23
--------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments