Add documentation about python -m pytest invocation.
This commit is contained in:
parent
ae4e596b31
commit
46cc9ab77c
|
@ -0,0 +1 @@
|
|||
Add documentation about the ``python -m pytest`` invocation adding the current directory to sys.path.
|
|
@ -68,4 +68,9 @@ imported in the global import namespace.
|
|||
|
||||
This is also discussed in details in :ref:`test discovery`.
|
||||
|
||||
Invoking ``pytest`` versus ``python -m pytest``
|
||||
-----------------------------------------------
|
||||
|
||||
Running pytest with ``python -m pytest [...]`` instead of ``pytest [...]`` yields nearly
|
||||
equivalent behaviour, except that the former call will add the current directory to ``sys.path``.
|
||||
See also :ref:`cmdline`.
|
||||
|
|
|
@ -17,7 +17,7 @@ You can invoke testing through the Python interpreter from the command line::
|
|||
python -m pytest [...]
|
||||
|
||||
This is almost equivalent to invoking the command line script ``pytest [...]``
|
||||
directly, except that Python will also add the current directory to ``sys.path``.
|
||||
directly, except that calling via ``python`` will also add the current directory to ``sys.path``.
|
||||
|
||||
Possible exit codes
|
||||
--------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue