--- /dev/null
+Metadata-Version: 2.1
+Name: pytest
+Version: 6.1.1
+Summary: pytest: simple powerful testing with Python
+Home-page: https://docs.pytest.org/en/latest/
+Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
+License: MIT
+Project-URL: Source, https://github.com/pytest-dev/pytest
+Project-URL: Tracker, https://github.com/pytest-dev/pytest/issues
+Description: .. image:: https://docs.pytest.org/en/stable/_static/pytest1.png
+ :target: https://docs.pytest.org/en/stable/
+ :align: center
+ :alt: pytest
+
+
+ ------
+
+ .. image:: https://img.shields.io/pypi/v/pytest.svg
+ :target: https://pypi.org/project/pytest/
+
+ .. image:: https://img.shields.io/conda/vn/conda-forge/pytest.svg
+ :target: https://anaconda.org/conda-forge/pytest
+
+ .. image:: https://img.shields.io/pypi/pyversions/pytest.svg
+ :target: https://pypi.org/project/pytest/
+
+ .. image:: https://codecov.io/gh/pytest-dev/pytest/branch/master/graph/badge.svg
+ :target: https://codecov.io/gh/pytest-dev/pytest
+ :alt: Code coverage Status
+
+ .. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
+ :target: https://travis-ci.org/pytest-dev/pytest
+
+ .. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
+ :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
+
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+
+ .. image:: https://www.codetriage.com/pytest-dev/pytest/badges/users.svg
+ :target: https://www.codetriage.com/pytest-dev/pytest
+
+ .. image:: https://readthedocs.org/projects/pytest/badge/?version=latest
+ :target: https://pytest.readthedocs.io/en/latest/?badge=latest
+ :alt: Documentation Status
+
+ The ``pytest`` framework makes it easy to write small tests, yet
+ scales to support complex functional testing for applications and libraries.
+
+ An example of a simple test:
+
+ .. code-block:: python
+
+ # content of test_sample.py
+ def inc(x):
+ return x + 1
+
+
+ def test_answer():
+ assert inc(3) == 5
+
+
+ To execute it::
+
+ $ pytest
+ ============================= test session starts =============================
+ collected 1 items
+
+ test_sample.py F
+
+ ================================== FAILURES ===================================
+ _________________________________ test_answer _________________________________
+
+ def test_answer():
+ > assert inc(3) == 5
+ E assert 4 == 5
+ E + where 4 = inc(3)
+
+ test_sample.py:5: AssertionError
+ ========================== 1 failed in 0.04 seconds ===========================
+
+
+ Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <https://docs.pytest.org/en/stable/getting-started.html#our-first-test-run>`_ for more examples.
+
+
+ Features
+ --------
+
+ - Detailed info on failing `assert statements <https://docs.pytest.org/en/stable/assert.html>`_ (no need to remember ``self.assert*`` names)
+
+ - `Auto-discovery
+ <https://docs.pytest.org/en/stable/goodpractices.html#python-test-discovery>`_
+ of test modules and functions
+
+ - `Modular fixtures <https://docs.pytest.org/en/stable/fixture.html>`_ for
+ managing small or parametrized long-lived test resources
+
+ - Can run `unittest <https://docs.pytest.org/en/stable/unittest.html>`_ (or trial),
+ `nose <https://docs.pytest.org/en/stable/nose.html>`_ test suites out of the box
+
+ - Python 3.5+ and PyPy3
+
+ - Rich plugin architecture, with over 850+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community
+
+
+ Documentation
+ -------------
+
+ For full documentation, including installation, tutorials and PDF documents, please see https://docs.pytest.org/en/stable/.
+
+
+ Bugs/Requests
+ -------------
+
+ Please use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issues>`_ to submit bugs or request features.
+
+
+ Changelog
+ ---------
+
+ Consult the `Changelog <https://docs.pytest.org/en/stable/changelog.html>`__ page for fixes and enhancements of each version.
+
+
+ Support pytest
+ --------------
+
+ `Open Collective`_ is an online funding platform for open and transparent communities.
+ It provides tools to raise money and share your finances in full transparency.
+
+ It is the platform of choice for individuals and companies that want to make one-time or
+ monthly donations directly to the project.
+
+ See more details in the `pytest collective`_.
+
+ .. _Open Collective: https://opencollective.com
+ .. _pytest collective: https://opencollective.com/pytest
+
+
+ pytest for enterprise
+ ---------------------
+
+ Available as part of the Tidelift Subscription.
+
+ The maintainers of pytest and thousands of other packages are working with Tidelift to deliver commercial support and
+ maintenance for the open source dependencies you use to build your applications.
+ Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.
+
+ `Learn more. <https://tidelift.com/subscription/pkg/pypi-pytest?utm_source=pypi-pytest&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`_
+
+ Security
+ ^^^^^^^^
+
+ pytest has never been associated with a security vulnerability, but in any case, to report a
+ security vulnerability please use the `Tidelift security contact <https://tidelift.com/security>`_.
+ Tidelift will coordinate the fix and disclosure.
+
+
+ License
+ -------
+
+ Copyright Holger Krekel and others, 2004-2020.
+
+ Distributed under the terms of the `MIT`_ license, pytest is free and open source software.
+
+ .. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE
+
+Keywords: test,unittest
+Platform: unix
+Platform: linux
+Platform: osx
+Platform: cygwin
+Platform: win32
+Classifier: Development Status :: 6 - Mature
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: MacOS :: MacOS X
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Testing
+Classifier: Topic :: Utilities
+Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
+Provides-Extra: checkqa_mypy
+Provides-Extra: testing
:maxdepth: 2
+ release-6.1.1
release-6.1.0
release-6.0.2
release-6.0.1
--- /dev/null
+pytest-6.1.1
+=======================================
+
+pytest 6.1.1 has just been released to PyPI.
+
+This is a bug-fix release, being a drop-in replacement. To upgrade::
+
+ pip install --upgrade pytest
+
+The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.
+
+Thanks to all of the contributors to this release:
+
+* Ran Benita
+
+
+Happy testing,
+The pytest Development Team
.. towncrier release notes start
+pytest 6.1.1 (2020-10-03)
+=========================
+
+Bug Fixes
+---------
+
+- `#7807 <https://github.com/pytest-dev/pytest/issues/7807>`_: Fixed regression in pytest 6.1.0 causing incorrect rootdir to be determined in some non-trivial cases where parent directories have config files as well.
+
+
+- `#7814 <https://github.com/pytest-dev/pytest/issues/7814>`_: Fixed crash in header reporting when :confval:`testpaths` is used and contains absolute paths (regression in 6.1.0).
+
+
pytest 6.1.0 (2020-09-26)
=========================
.. code-block:: bash
$ pytest --version
- pytest 6.1.0
+ pytest 6.1.1
.. _`simpletest`:
``pytest`` loads plugin modules at tool startup in the following way:
-* by loading all builtin plugins
+1. by scanning the command line for the ``-p no:name`` option
+ and *blocking* that plugin from being loaded (even builtin plugins can
+ be blocked this way). This happens before normal command-line parsing.
-* by loading all plugins registered through `setuptools entry points`_.
+2. by loading all builtin plugins.
-* by pre-scanning the command line for the ``-p name`` option
- and loading the specified plugin before actual command line parsing.
+3. by scanning the command line for the ``-p name`` option
+ and loading the specified plugin. This happens before normal command-line parsing.
-* by loading all :file:`conftest.py` files as inferred by the command line
- invocation:
+4. by loading all plugins registered through `setuptools entry points`_.
- - if no test paths are specified use current dir as a test path
- - if exists, load ``conftest.py`` and ``test*/conftest.py`` relative
- to the directory part of the first test path.
+5. by loading all plugins specified through the :envvar:`PYTEST_PLUGINS` environment variable.
- Note that pytest does not find ``conftest.py`` files in deeper nested
- sub directories at tool startup. It is usually a good idea to keep
- your ``conftest.py`` file in the top level test or project root directory.
+6. by loading all :file:`conftest.py` files as inferred by the command line
+ invocation:
-* by recursively loading all plugins specified by the
- :globalvar:`pytest_plugins` variable in ``conftest.py`` files
+ - if no test paths are specified, use the current dir as a test path
+ - if exists, load ``conftest.py`` and ``test*/conftest.py`` relative
+ to the directory part of the first test path. After the ``conftest.py``
+ file is loaded, load all plugins specified in its
+ :globalvar:`pytest_plugins` variable if present.
+
+ Note that pytest does not find ``conftest.py`` files in deeper nested
+ sub directories at tool startup. It is usually a good idea to keep
+ your ``conftest.py`` file in the top level test or project root directory.
+
+7. by recursively loading all plugins specified by the
+ :globalvar:`pytest_plugins` variable in ``conftest.py`` files.
.. _`pytest/plugin`: http://bitbucket.org/pytest-dev/pytest/src/tip/pytest/plugin/
license = MIT
license_file = LICENSE
platforms = unix, linux, osx, cygwin, win32
-classifiers =
- Development Status :: 6 - Mature
- Intended Audience :: Developers
- License :: OSI Approved :: MIT License
- Operating System :: MacOS :: MacOS X
- Operating System :: Microsoft :: Windows
- Operating System :: POSIX
- Programming Language :: Python :: 3
- Programming Language :: Python :: 3 :: Only
- Programming Language :: Python :: 3.5
- Programming Language :: Python :: 3.6
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Topic :: Software Development :: Libraries
- Topic :: Software Development :: Testing
- Topic :: Utilities
+classifiers =
+ Development Status :: 6 - Mature
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Operating System :: MacOS :: MacOS X
+ Operating System :: Microsoft :: Windows
+ Operating System :: POSIX
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ Topic :: Software Development :: Libraries
+ Topic :: Software Development :: Testing
+ Topic :: Utilities
keywords = test, unittest
-project_urls =
- Source=https://github.com/pytest-dev/pytest
- Tracker=https://github.com/pytest-dev/pytest/issues
+project_urls =
+ Source=https://github.com/pytest-dev/pytest
+ Tracker=https://github.com/pytest-dev/pytest/issues
[options]
-packages =
- _pytest
- _pytest._code
- _pytest._io
- _pytest.assertion
- _pytest.config
- _pytest.mark
- pytest
-install_requires =
- attrs>=17.4.0
- iniconfig
- packaging
- pluggy>=0.12,<1.0
- py>=1.8.2
- toml
- atomicwrites>=1.0;sys_platform=="win32"
- colorama;sys_platform=="win32"
- importlib-metadata>=0.12;python_version<"3.8"
- pathlib2>=2.2.0;python_version<"3.6"
+packages =
+ _pytest
+ _pytest._code
+ _pytest._io
+ _pytest.assertion
+ _pytest.config
+ _pytest.mark
+ pytest
+install_requires =
+ attrs>=17.4.0
+ iniconfig
+ packaging
+ pluggy>=0.12,<1.0
+ py>=1.8.2
+ toml
+ atomicwrites>=1.0;sys_platform=="win32"
+ colorama;sys_platform=="win32"
+ importlib-metadata>=0.12;python_version<"3.8"
+ pathlib2>=2.2.0;python_version<"3.6"
python_requires = >=3.5
-package_dir =
- =src
-setup_requires =
- setuptools>=40.0
- setuptools-scm
+package_dir =
+ =src
+setup_requires =
+ setuptools>=40.0
+ setuptools-scm
zip_safe = no
[options.entry_points]
-console_scripts =
- pytest=pytest:console_main
- py.test=pytest:console_main
+console_scripts =
+ pytest=pytest:console_main
+ py.test=pytest:console_main
[options.extras_require]
-checkqa-mypy =
- mypy==0.780
-testing =
- argcomplete
- hypothesis>=3.56
- mock
- nose
- requests
- xmlschema
+checkqa-mypy =
+ mypy==0.780
+testing =
+ argcomplete
+ hypothesis>=3.56
+ mock
+ nose
+ requests
+ xmlschema
[options.package_data]
_pytest = py.typed
upload-dir = doc/en/build/html
[check-manifest]
-ignore =
- src/_pytest/_version.py
+ignore =
+ src/_pytest/_version.py
[devpi:upload]
formats = sdist.tgz,bdist_wheel
warn_unreachable = True
warn_unused_configs = True
no_implicit_reexport = True
+
+[egg_info]
+tag_build =
+tag_date = 0
+
--- /dev/null
+# coding: utf-8
+# file generated by setuptools_scm
+# don't change, don't track in version control
+version = '6.1.1'
-import itertools
import os
from typing import Dict
from typing import Iterable
args = [Path.cwd()]
for arg in args:
argpath = absolutepath(arg)
- for base in itertools.chain((argpath,), reversed(argpath.parents)):
+ for base in (argpath, *argpath.parents):
for config_name in config_names:
p = base / config_name
if p.is_file():
ancestor = get_common_ancestor(dirs)
rootdir, inipath, inicfg = locate_config([ancestor])
if rootdir is None and rootdir_cmd_arg is None:
- for possible_rootdir in itertools.chain(
- (ancestor,), reversed(ancestor.parents)
- ):
+ for possible_rootdir in (ancestor, *ancestor.parents):
if (possible_rootdir / "setup.py").is_file():
rootdir = possible_rootdir
break
if config.inipath:
line += ", configfile: " + bestrelpath(config.rootpath, config.inipath)
- testpaths = config.getini("testpaths")
+ testpaths = config.getini("testpaths") # type: List[str]
if testpaths and config.args == testpaths:
- rel_paths = [bestrelpath(config.rootpath, x) for x in testpaths]
- line += ", testpaths: {}".format(", ".join(rel_paths))
+ line += ", testpaths: {}".format(", ".join(testpaths))
+
result = [line]
plugininfo = config.pluginmanager.list_plugin_distinfo()
--- /dev/null
+Metadata-Version: 2.1
+Name: pytest
+Version: 6.1.1
+Summary: pytest: simple powerful testing with Python
+Home-page: https://docs.pytest.org/en/latest/
+Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
+License: MIT
+Project-URL: Source, https://github.com/pytest-dev/pytest
+Project-URL: Tracker, https://github.com/pytest-dev/pytest/issues
+Description: .. image:: https://docs.pytest.org/en/stable/_static/pytest1.png
+ :target: https://docs.pytest.org/en/stable/
+ :align: center
+ :alt: pytest
+
+
+ ------
+
+ .. image:: https://img.shields.io/pypi/v/pytest.svg
+ :target: https://pypi.org/project/pytest/
+
+ .. image:: https://img.shields.io/conda/vn/conda-forge/pytest.svg
+ :target: https://anaconda.org/conda-forge/pytest
+
+ .. image:: https://img.shields.io/pypi/pyversions/pytest.svg
+ :target: https://pypi.org/project/pytest/
+
+ .. image:: https://codecov.io/gh/pytest-dev/pytest/branch/master/graph/badge.svg
+ :target: https://codecov.io/gh/pytest-dev/pytest
+ :alt: Code coverage Status
+
+ .. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
+ :target: https://travis-ci.org/pytest-dev/pytest
+
+ .. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
+ :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
+
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+
+ .. image:: https://www.codetriage.com/pytest-dev/pytest/badges/users.svg
+ :target: https://www.codetriage.com/pytest-dev/pytest
+
+ .. image:: https://readthedocs.org/projects/pytest/badge/?version=latest
+ :target: https://pytest.readthedocs.io/en/latest/?badge=latest
+ :alt: Documentation Status
+
+ The ``pytest`` framework makes it easy to write small tests, yet
+ scales to support complex functional testing for applications and libraries.
+
+ An example of a simple test:
+
+ .. code-block:: python
+
+ # content of test_sample.py
+ def inc(x):
+ return x + 1
+
+
+ def test_answer():
+ assert inc(3) == 5
+
+
+ To execute it::
+
+ $ pytest
+ ============================= test session starts =============================
+ collected 1 items
+
+ test_sample.py F
+
+ ================================== FAILURES ===================================
+ _________________________________ test_answer _________________________________
+
+ def test_answer():
+ > assert inc(3) == 5
+ E assert 4 == 5
+ E + where 4 = inc(3)
+
+ test_sample.py:5: AssertionError
+ ========================== 1 failed in 0.04 seconds ===========================
+
+
+ Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <https://docs.pytest.org/en/stable/getting-started.html#our-first-test-run>`_ for more examples.
+
+
+ Features
+ --------
+
+ - Detailed info on failing `assert statements <https://docs.pytest.org/en/stable/assert.html>`_ (no need to remember ``self.assert*`` names)
+
+ - `Auto-discovery
+ <https://docs.pytest.org/en/stable/goodpractices.html#python-test-discovery>`_
+ of test modules and functions
+
+ - `Modular fixtures <https://docs.pytest.org/en/stable/fixture.html>`_ for
+ managing small or parametrized long-lived test resources
+
+ - Can run `unittest <https://docs.pytest.org/en/stable/unittest.html>`_ (or trial),
+ `nose <https://docs.pytest.org/en/stable/nose.html>`_ test suites out of the box
+
+ - Python 3.5+ and PyPy3
+
+ - Rich plugin architecture, with over 850+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community
+
+
+ Documentation
+ -------------
+
+ For full documentation, including installation, tutorials and PDF documents, please see https://docs.pytest.org/en/stable/.
+
+
+ Bugs/Requests
+ -------------
+
+ Please use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issues>`_ to submit bugs or request features.
+
+
+ Changelog
+ ---------
+
+ Consult the `Changelog <https://docs.pytest.org/en/stable/changelog.html>`__ page for fixes and enhancements of each version.
+
+
+ Support pytest
+ --------------
+
+ `Open Collective`_ is an online funding platform for open and transparent communities.
+ It provides tools to raise money and share your finances in full transparency.
+
+ It is the platform of choice for individuals and companies that want to make one-time or
+ monthly donations directly to the project.
+
+ See more details in the `pytest collective`_.
+
+ .. _Open Collective: https://opencollective.com
+ .. _pytest collective: https://opencollective.com/pytest
+
+
+ pytest for enterprise
+ ---------------------
+
+ Available as part of the Tidelift Subscription.
+
+ The maintainers of pytest and thousands of other packages are working with Tidelift to deliver commercial support and
+ maintenance for the open source dependencies you use to build your applications.
+ Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.
+
+ `Learn more. <https://tidelift.com/subscription/pkg/pypi-pytest?utm_source=pypi-pytest&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`_
+
+ Security
+ ^^^^^^^^
+
+ pytest has never been associated with a security vulnerability, but in any case, to report a
+ security vulnerability please use the `Tidelift security contact <https://tidelift.com/security>`_.
+ Tidelift will coordinate the fix and disclosure.
+
+
+ License
+ -------
+
+ Copyright Holger Krekel and others, 2004-2020.
+
+ Distributed under the terms of the `MIT`_ license, pytest is free and open source software.
+
+ .. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE
+
+Keywords: test,unittest
+Platform: unix
+Platform: linux
+Platform: osx
+Platform: cygwin
+Platform: win32
+Classifier: Development Status :: 6 - Mature
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: MacOS :: MacOS X
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Testing
+Classifier: Topic :: Utilities
+Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
+Provides-Extra: checkqa_mypy
+Provides-Extra: testing
--- /dev/null
+.coveragerc
+.gitattributes
+.gitblameignore
+.gitignore
+.pre-commit-config.yaml
+.readthedocs.yml
+.travis.yml
+AUTHORS
+CHANGELOG.rst
+CITATION
+CODE_OF_CONDUCT.md
+CONTRIBUTING.rst
+LICENSE
+OPENCOLLECTIVE.rst
+README.rst
+RELEASING.rst
+TIDELIFT.rst
+codecov.yml
+pyproject.toml
+setup.cfg
+setup.py
+tox.ini
+.github/FUNDING.yml
+.github/PULL_REQUEST_TEMPLATE.md
+.github/config.yml
+.github/labels.toml
+.github/ISSUE_TEMPLATE/1_bug_report.md
+.github/ISSUE_TEMPLATE/2_feature_request.md
+.github/ISSUE_TEMPLATE/config.yml
+.github/workflows/main.yml
+.github/workflows/release-on-comment.yml
+bench/bench.py
+bench/bench_argcomplete.py
+bench/empty.py
+bench/manyparam.py
+bench/skip.py
+changelog/README.rst
+changelog/_template.rst
+doc/en/Makefile
+doc/en/adopt.rst
+doc/en/assert.rst
+doc/en/backwards-compatibility.rst
+doc/en/bash-completion.rst
+doc/en/builtin.rst
+doc/en/cache.rst
+doc/en/capture.rst
+doc/en/changelog.rst
+doc/en/conf.py
+doc/en/conftest.py
+doc/en/contact.rst
+doc/en/contents.rst
+doc/en/contributing.rst
+doc/en/customize.rst
+doc/en/deprecations.rst
+doc/en/development_guide.rst
+doc/en/doctest.rst
+doc/en/existingtestsuite.rst
+doc/en/fixture.rst
+doc/en/flaky.rst
+doc/en/funcarg_compare.rst
+doc/en/funcargs.rst
+doc/en/getting-started.rst
+doc/en/goodpractices.rst
+doc/en/historical-notes.rst
+doc/en/index.rst
+doc/en/license.rst
+doc/en/logging.rst
+doc/en/mark.rst
+doc/en/monkeypatch.rst
+doc/en/naming20.rst
+doc/en/nose.rst
+doc/en/parametrize.rst
+doc/en/plugins.rst
+doc/en/projects.rst
+doc/en/py27-py34-deprecation.rst
+doc/en/pytest.ini
+doc/en/pythonpath.rst
+doc/en/recwarn.rst
+doc/en/reference.rst
+doc/en/requirements.txt
+doc/en/skipping.rst
+doc/en/sponsor.rst
+doc/en/talks.rst
+doc/en/tidelift.rst
+doc/en/tmpdir.rst
+doc/en/unittest.rst
+doc/en/usage.rst
+doc/en/warnings.rst
+doc/en/writing_plugins.rst
+doc/en/xunit_setup.rst
+doc/en/yieldfixture.rst
+doc/en/_templates/globaltoc.html
+doc/en/_templates/layout.html
+doc/en/_templates/links.html
+doc/en/_templates/relations.html
+doc/en/_templates/sidebarintro.html
+doc/en/_templates/slim_searchbox.html
+doc/en/announce/index.rst
+doc/en/announce/release-2.0.0.rst
+doc/en/announce/release-2.0.1.rst
+doc/en/announce/release-2.0.2.rst
+doc/en/announce/release-2.0.3.rst
+doc/en/announce/release-2.1.0.rst
+doc/en/announce/release-2.1.1.rst
+doc/en/announce/release-2.1.2.rst
+doc/en/announce/release-2.1.3.rst
+doc/en/announce/release-2.2.0.rst
+doc/en/announce/release-2.2.1.rst
+doc/en/announce/release-2.2.2.rst
+doc/en/announce/release-2.2.4.rst
+doc/en/announce/release-2.3.0.rst
+doc/en/announce/release-2.3.1.rst
+doc/en/announce/release-2.3.2.rst
+doc/en/announce/release-2.3.3.rst
+doc/en/announce/release-2.3.4.rst
+doc/en/announce/release-2.3.5.rst
+doc/en/announce/release-2.4.0.rst
+doc/en/announce/release-2.4.1.rst
+doc/en/announce/release-2.4.2.rst
+doc/en/announce/release-2.5.0.rst
+doc/en/announce/release-2.5.1.rst
+doc/en/announce/release-2.5.2.rst
+doc/en/announce/release-2.6.0.rst
+doc/en/announce/release-2.6.1.rst
+doc/en/announce/release-2.6.2.rst
+doc/en/announce/release-2.6.3.rst
+doc/en/announce/release-2.7.0.rst
+doc/en/announce/release-2.7.1.rst
+doc/en/announce/release-2.7.2.rst
+doc/en/announce/release-2.8.2.rst
+doc/en/announce/release-2.8.3.rst
+doc/en/announce/release-2.8.4.rst
+doc/en/announce/release-2.8.5.rst
+doc/en/announce/release-2.8.6.rst
+doc/en/announce/release-2.8.7.rst
+doc/en/announce/release-2.9.0.rst
+doc/en/announce/release-2.9.1.rst
+doc/en/announce/release-2.9.2.rst
+doc/en/announce/release-3.0.0.rst
+doc/en/announce/release-3.0.1.rst
+doc/en/announce/release-3.0.2.rst
+doc/en/announce/release-3.0.3.rst
+doc/en/announce/release-3.0.4.rst
+doc/en/announce/release-3.0.5.rst
+doc/en/announce/release-3.0.6.rst
+doc/en/announce/release-3.0.7.rst
+doc/en/announce/release-3.1.0.rst
+doc/en/announce/release-3.1.1.rst
+doc/en/announce/release-3.1.2.rst
+doc/en/announce/release-3.1.3.rst
+doc/en/announce/release-3.10.0.rst
+doc/en/announce/release-3.10.1.rst
+doc/en/announce/release-3.2.0.rst
+doc/en/announce/release-3.2.1.rst
+doc/en/announce/release-3.2.2.rst
+doc/en/announce/release-3.2.3.rst
+doc/en/announce/release-3.2.4.rst
+doc/en/announce/release-3.2.5.rst
+doc/en/announce/release-3.3.0.rst
+doc/en/announce/release-3.3.1.rst
+doc/en/announce/release-3.3.2.rst
+doc/en/announce/release-3.4.0.rst
+doc/en/announce/release-3.4.1.rst
+doc/en/announce/release-3.4.2.rst
+doc/en/announce/release-3.5.0.rst
+doc/en/announce/release-3.5.1.rst
+doc/en/announce/release-3.6.0.rst
+doc/en/announce/release-3.6.1.rst
+doc/en/announce/release-3.6.2.rst
+doc/en/announce/release-3.6.3.rst
+doc/en/announce/release-3.6.4.rst
+doc/en/announce/release-3.7.0.rst
+doc/en/announce/release-3.7.1.rst
+doc/en/announce/release-3.7.2.rst
+doc/en/announce/release-3.7.3.rst
+doc/en/announce/release-3.7.4.rst
+doc/en/announce/release-3.8.0.rst
+doc/en/announce/release-3.8.1.rst
+doc/en/announce/release-3.8.2.rst
+doc/en/announce/release-3.9.0.rst
+doc/en/announce/release-3.9.1.rst
+doc/en/announce/release-3.9.2.rst
+doc/en/announce/release-3.9.3.rst
+doc/en/announce/release-4.0.0.rst
+doc/en/announce/release-4.0.1.rst
+doc/en/announce/release-4.0.2.rst
+doc/en/announce/release-4.1.0.rst
+doc/en/announce/release-4.1.1.rst
+doc/en/announce/release-4.2.0.rst
+doc/en/announce/release-4.2.1.rst
+doc/en/announce/release-4.3.0.rst
+doc/en/announce/release-4.3.1.rst
+doc/en/announce/release-4.4.0.rst
+doc/en/announce/release-4.4.1.rst
+doc/en/announce/release-4.4.2.rst
+doc/en/announce/release-4.5.0.rst
+doc/en/announce/release-4.6.0.rst
+doc/en/announce/release-4.6.1.rst
+doc/en/announce/release-4.6.2.rst
+doc/en/announce/release-4.6.3.rst
+doc/en/announce/release-4.6.4.rst
+doc/en/announce/release-4.6.5.rst
+doc/en/announce/release-4.6.6.rst
+doc/en/announce/release-4.6.7.rst
+doc/en/announce/release-4.6.8.rst
+doc/en/announce/release-4.6.9.rst
+doc/en/announce/release-5.0.0.rst
+doc/en/announce/release-5.0.1.rst
+doc/en/announce/release-5.1.0.rst
+doc/en/announce/release-5.1.1.rst
+doc/en/announce/release-5.1.2.rst
+doc/en/announce/release-5.1.3.rst
+doc/en/announce/release-5.2.0.rst
+doc/en/announce/release-5.2.1.rst
+doc/en/announce/release-5.2.2.rst
+doc/en/announce/release-5.2.3.rst
+doc/en/announce/release-5.2.4.rst
+doc/en/announce/release-5.3.0.rst
+doc/en/announce/release-5.3.1.rst
+doc/en/announce/release-5.3.2.rst
+doc/en/announce/release-5.3.3.rst
+doc/en/announce/release-5.3.4.rst
+doc/en/announce/release-5.3.5.rst
+doc/en/announce/release-5.4.0.rst
+doc/en/announce/release-5.4.1.rst
+doc/en/announce/release-5.4.2.rst
+doc/en/announce/release-5.4.3.rst
+doc/en/announce/release-6.0.0.rst
+doc/en/announce/release-6.0.0rc1.rst
+doc/en/announce/release-6.0.1.rst
+doc/en/announce/release-6.0.2.rst
+doc/en/announce/release-6.1.0.rst
+doc/en/announce/release-6.1.1.rst
+doc/en/announce/sprint2016.rst
+doc/en/example/attic.rst
+doc/en/example/conftest.py
+doc/en/example/index.rst
+doc/en/example/markers.rst
+doc/en/example/multipython.py
+doc/en/example/nonpython.rst
+doc/en/example/parametrize.rst
+doc/en/example/pythoncollection.py
+doc/en/example/pythoncollection.rst
+doc/en/example/reportingdemo.rst
+doc/en/example/simple.rst
+doc/en/example/special.rst
+doc/en/example/xfail_demo.py
+doc/en/example/assertion/failure_demo.py
+doc/en/example/assertion/test_failures.py
+doc/en/example/assertion/test_setup_flow_example.py
+doc/en/example/assertion/global_testmodule_config/conftest.py
+doc/en/example/assertion/global_testmodule_config/test_hello_world.py
+doc/en/example/fixtures/test_fixtures_order.py
+doc/en/example/nonpython/__init__.py
+doc/en/example/nonpython/conftest.py
+doc/en/example/nonpython/test_simple.yaml
+doc/en/img/cramer2.png
+doc/en/img/favicon.png
+doc/en/img/freiburg2.jpg
+doc/en/img/gaynor3.png
+doc/en/img/keleshev.png
+doc/en/img/pullrequest.png
+doc/en/img/pylib.png
+doc/en/img/pytest1.png
+doc/en/img/theuni.png
+doc/en/proposals/parametrize_with_fixtures.rst
+extra/get_issues.py
+extra/setup-py.test/setup.py
+scripts/append_codecov_token.py
+scripts/publish-gh-release-notes.py
+scripts/release-on-comment.py
+scripts/release.minor.rst
+scripts/release.patch.rst
+scripts/release.py
+scripts/report-coverage.sh
+scripts/towncrier-draft-to-file.py
+src/_pytest/__init__.py
+src/_pytest/_argcomplete.py
+src/_pytest/_version.py
+src/_pytest/cacheprovider.py
+src/_pytest/capture.py
+src/_pytest/compat.py
+src/_pytest/debugging.py
+src/_pytest/deprecated.py
+src/_pytest/doctest.py
+src/_pytest/faulthandler.py
+src/_pytest/fixtures.py
+src/_pytest/freeze_support.py
+src/_pytest/helpconfig.py
+src/_pytest/hookspec.py
+src/_pytest/junitxml.py
+src/_pytest/logging.py
+src/_pytest/main.py
+src/_pytest/monkeypatch.py
+src/_pytest/nodes.py
+src/_pytest/nose.py
+src/_pytest/outcomes.py
+src/_pytest/pastebin.py
+src/_pytest/pathlib.py
+src/_pytest/py.typed
+src/_pytest/pytester.py
+src/_pytest/python.py
+src/_pytest/python_api.py
+src/_pytest/recwarn.py
+src/_pytest/reports.py
+src/_pytest/runner.py
+src/_pytest/setuponly.py
+src/_pytest/setupplan.py
+src/_pytest/skipping.py
+src/_pytest/stepwise.py
+src/_pytest/store.py
+src/_pytest/terminal.py
+src/_pytest/timing.py
+src/_pytest/tmpdir.py
+src/_pytest/unittest.py
+src/_pytest/warning_types.py
+src/_pytest/warnings.py
+src/_pytest/_code/__init__.py
+src/_pytest/_code/code.py
+src/_pytest/_code/source.py
+src/_pytest/_io/__init__.py
+src/_pytest/_io/saferepr.py
+src/_pytest/_io/terminalwriter.py
+src/_pytest/_io/wcwidth.py
+src/_pytest/assertion/__init__.py
+src/_pytest/assertion/rewrite.py
+src/_pytest/assertion/truncate.py
+src/_pytest/assertion/util.py
+src/_pytest/config/__init__.py
+src/_pytest/config/argparsing.py
+src/_pytest/config/exceptions.py
+src/_pytest/config/findpaths.py
+src/_pytest/mark/__init__.py
+src/_pytest/mark/expression.py
+src/_pytest/mark/structures.py
+src/pytest/__init__.py
+src/pytest/__main__.py
+src/pytest/collect.py
+src/pytest/py.typed
+src/pytest.egg-info/PKG-INFO
+src/pytest.egg-info/SOURCES.txt
+src/pytest.egg-info/dependency_links.txt
+src/pytest.egg-info/entry_points.txt
+src/pytest.egg-info/not-zip-safe
+src/pytest.egg-info/requires.txt
+src/pytest.egg-info/top_level.txt
+testing/acceptance_test.py
+testing/conftest.py
+testing/deprecated_test.py
+testing/test_argcomplete.py
+testing/test_assertion.py
+testing/test_assertrewrite.py
+testing/test_cacheprovider.py
+testing/test_capture.py
+testing/test_collection.py
+testing/test_compat.py
+testing/test_config.py
+testing/test_conftest.py
+testing/test_debugging.py
+testing/test_doctest.py
+testing/test_entry_points.py
+testing/test_error_diffs.py
+testing/test_faulthandler.py
+testing/test_findpaths.py
+testing/test_helpconfig.py
+testing/test_junitxml.py
+testing/test_link_resolve.py
+testing/test_main.py
+testing/test_mark.py
+testing/test_mark_expression.py
+testing/test_meta.py
+testing/test_monkeypatch.py
+testing/test_nodes.py
+testing/test_nose.py
+testing/test_parseopt.py
+testing/test_pastebin.py
+testing/test_pathlib.py
+testing/test_pluginmanager.py
+testing/test_pytester.py
+testing/test_recwarn.py
+testing/test_reports.py
+testing/test_runner.py
+testing/test_runner_xunit.py
+testing/test_session.py
+testing/test_setuponly.py
+testing/test_setupplan.py
+testing/test_skipping.py
+testing/test_stepwise.py
+testing/test_store.py
+testing/test_terminal.py
+testing/test_tmpdir.py
+testing/test_unittest.py
+testing/test_warning_types.py
+testing/test_warnings.py
+testing/typing_checks.py
+testing/code/test_code.py
+testing/code/test_excinfo.py
+testing/code/test_source.py
+testing/example_scripts/README.rst
+testing/example_scripts/issue_519.py
+testing/example_scripts/junit-10.xsd
+testing/example_scripts/pytest.ini
+testing/example_scripts/acceptance/fixture_mock_integration.py
+testing/example_scripts/collect/collect_init_tests/pytest.ini
+testing/example_scripts/collect/collect_init_tests/tests/__init__.py
+testing/example_scripts/collect/collect_init_tests/tests/test_foo.py
+testing/example_scripts/collect/package_infinite_recursion/__init__.pyi
+testing/example_scripts/collect/package_infinite_recursion/conftest.py
+testing/example_scripts/collect/package_infinite_recursion/tests/__init__.py
+testing/example_scripts/collect/package_infinite_recursion/tests/test_basic.py
+testing/example_scripts/collect/package_init_given_as_arg/pkg/__init__.py
+testing/example_scripts/collect/package_init_given_as_arg/pkg/test_foo.py
+testing/example_scripts/config/collect_pytest_prefix/__init__.pyi
+testing/example_scripts/config/collect_pytest_prefix/conftest.py
+testing/example_scripts/config/collect_pytest_prefix/test_foo.py
+testing/example_scripts/conftest_usageerror/__init__.pyi
+testing/example_scripts/conftest_usageerror/conftest.py
+testing/example_scripts/dataclasses/test_compare_dataclasses.py
+testing/example_scripts/dataclasses/test_compare_dataclasses_field_comparison_off.py
+testing/example_scripts/dataclasses/test_compare_dataclasses_verbose.py
+testing/example_scripts/dataclasses/test_compare_recursive_dataclasses.py
+testing/example_scripts/dataclasses/test_compare_two_different_dataclasses.py
+testing/example_scripts/fixtures/test_fixture_named_request.py
+testing/example_scripts/fixtures/test_getfixturevalue_dynamic.py
+testing/example_scripts/fixtures/custom_item/__init__.pyi
+testing/example_scripts/fixtures/custom_item/conftest.py
+testing/example_scripts/fixtures/custom_item/foo/__init__.py
+testing/example_scripts/fixtures/custom_item/foo/test_foo.py
+testing/example_scripts/fixtures/fill_fixtures/test_detect_recursive_dependency_error.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_module_class.py
+testing/example_scripts/fixtures/fill_fixtures/test_funcarg_basic.py
+testing/example_scripts/fixtures/fill_fixtures/test_funcarg_lookup_classlevel.py
+testing/example_scripts/fixtures/fill_fixtures/test_funcarg_lookup_modulelevel.py
+testing/example_scripts/fixtures/fill_fixtures/test_funcarg_lookupfails.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub1/__init__.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub1/conftest.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub1/test_in_sub1.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub2/__init__.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub2/conftest.py
+testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub2/test_in_sub2.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/__init__.pyi
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/conftest.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/pkg/__init__.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/pkg/conftest.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_conftest/pkg/test_spam.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_module/__init__.pyi
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_module/conftest.py
+testing/example_scripts/fixtures/fill_fixtures/test_extend_fixture_conftest_module/test_extend_fixture_conftest_module.py
+testing/example_scripts/issue88_initial_file_multinodes/__init__.pyi
+testing/example_scripts/issue88_initial_file_multinodes/conftest.py
+testing/example_scripts/issue88_initial_file_multinodes/test_hello.py
+testing/example_scripts/marks/marks_considered_keywords/__init__.pyi
+testing/example_scripts/marks/marks_considered_keywords/conftest.py
+testing/example_scripts/marks/marks_considered_keywords/test_marks_as_keywords.py
+testing/example_scripts/perf_examples/collect_stats/.gitignore
+testing/example_scripts/perf_examples/collect_stats/generate_folders.py
+testing/example_scripts/perf_examples/collect_stats/template_test.py
+testing/example_scripts/tmpdir/tmpdir_fixture.py
+testing/example_scripts/unittest/test_parametrized_fixture_error_message.py
+testing/example_scripts/unittest/test_setup_skip.py
+testing/example_scripts/unittest/test_setup_skip_class.py
+testing/example_scripts/unittest/test_setup_skip_module.py
+testing/example_scripts/unittest/test_unittest_asyncio.py
+testing/example_scripts/unittest/test_unittest_asynctest.py
+testing/example_scripts/unittest/test_unittest_plain_async.py
+testing/example_scripts/warnings/test_group_warnings_by_message.py
+testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py
+testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_2.py
+testing/examples/test_issue519.py
+testing/freeze/.gitignore
+testing/freeze/create_executable.py
+testing/freeze/runtests_script.py
+testing/freeze/tox_run.py
+testing/freeze/tests/test_doctest.txt
+testing/freeze/tests/test_trivial.py
+testing/io/test_saferepr.py
+testing/io/test_terminalwriter.py
+testing/io/test_wcwidth.py
+testing/logging/test_fixture.py
+testing/logging/test_formatter.py
+testing/logging/test_reporting.py
+testing/plugins_integration/.gitignore
+testing/plugins_integration/README.rst
+testing/plugins_integration/bdd_wallet.feature
+testing/plugins_integration/bdd_wallet.py
+testing/plugins_integration/django_settings.py
+testing/plugins_integration/pytest.ini
+testing/plugins_integration/pytest_anyio_integration.py
+testing/plugins_integration/pytest_asyncio_integration.py
+testing/plugins_integration/pytest_mock_integration.py
+testing/plugins_integration/pytest_trio_integration.py
+testing/plugins_integration/pytest_twisted_integration.py
+testing/plugins_integration/simple_integration.py
+testing/python/approx.py
+testing/python/collect.py
+testing/python/fixtures.py
+testing/python/integration.py
+testing/python/metafunc.py
+testing/python/raises.py
+testing/python/show_fixtures_per_test.py
\ No newline at end of file
--- /dev/null
+[console_scripts]
+py.test = pytest:console_main
+pytest = pytest:console_main
+
--- /dev/null
+attrs>=17.4.0
+iniconfig
+packaging
+pluggy<1.0,>=0.12
+py>=1.8.2
+toml
+
+[:python_version < "3.6"]
+pathlib2>=2.2.0
+
+[:python_version < "3.8"]
+importlib-metadata>=0.12
+
+[:sys_platform == "win32"]
+atomicwrites>=1.0
+colorama
+
+[checkqa_mypy]
+mypy==0.780
+
+[testing]
+argcomplete
+hypothesis>=3.56
+mock
+nose
+requests
+xmlschema
--- /dev/null
+_pytest
+pytest
assert rootpath == tmp_path
assert inipath is None
+ def test_with_config_also_in_parent_directory(
+ self, tmp_path: Path, monkeypatch: MonkeyPatch
+ ) -> None:
+ """Regression test for #7807."""
+ (tmp_path / "setup.cfg").write_text("[tool:pytest]\n", "utf-8")
+ (tmp_path / "myproject").mkdir()
+ (tmp_path / "myproject" / "setup.cfg").write_text("[tool:pytest]\n", "utf-8")
+ (tmp_path / "myproject" / "tests").mkdir()
+ monkeypatch.chdir(tmp_path / "myproject")
+
+ rootpath, inipath, _ = determine_setup(None, ["tests/"])
+
+ assert rootpath == tmp_path / "myproject"
+ assert inipath == tmp_path / "myproject" / "setup.cfg"
+
class TestOverrideIniArgs:
@pytest.mark.parametrize("name", "setup.cfg tox.ini pytest.ini".split())
from _pytest._io.wcwidth import wcswidth
from _pytest.config import Config
from _pytest.config import ExitCode
+from _pytest.monkeypatch import MonkeyPatch
from _pytest.pathlib import Path
from _pytest.pytester import Testdir
from _pytest.reports import BaseReport
result = testdir.runpytest("tests")
result.stdout.fnmatch_lines(["rootdir: *test_header0, configfile: tox.ini"])
+ def test_header_absolute_testpath(
+ self, testdir: Testdir, monkeypatch: MonkeyPatch
+ ) -> None:
+ """Regresstion test for #7814."""
+ tests = testdir.tmpdir.join("tests")
+ tests.ensure_dir()
+ testdir.makepyprojecttoml(
+ """
+ [tool.pytest.ini_options]
+ testpaths = ['{}']
+ """.format(
+ tests
+ )
+ )
+ result = testdir.runpytest()
+ result.stdout.fnmatch_lines(
+ [
+ "rootdir: *absolute_testpath0, configfile: pyproject.toml, testpaths: {}".format(
+ tests
+ )
+ ]
+ )
+
def test_no_header(self, testdir):
testdir.tmpdir.join("tests").ensure_dir()
testdir.tmpdir.join("gui").ensure_dir()