From: DongHun Kwak Date: Thu, 18 Mar 2021 02:33:42 +0000 (+0900) Subject: Imported Upstream version 6.1.1 X-Git-Tag: upstream/6.1.1^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d3d71c5ea0de65b0ead25bc4244989a64430638;p=platform%2Fupstream%2Fpython3-pytest.git Imported Upstream version 6.1.1 --- diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..9a387bf --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,192 @@ +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 `_ for more examples. + + + Features + -------- + + - Detailed info on failing `assert statements `_ (no need to remember ``self.assert*`` names) + + - `Auto-discovery + `_ + of test modules and functions + + - `Modular fixtures `_ for + managing small or parametrized long-lived test resources + + - Can run `unittest `_ (or trial), + `nose `_ test suites out of the box + + - Python 3.5+ and PyPy3 + + - Rich plugin architecture, with over 850+ `external plugins `_ 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 `_ to submit bugs or request features. + + + Changelog + --------- + + Consult the `Changelog `__ 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. `_ + + 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 `_. + 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 diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index 753e811..bda389c 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-6.1.1 release-6.1.0 release-6.0.2 release-6.0.1 diff --git a/doc/en/announce/release-6.1.1.rst b/doc/en/announce/release-6.1.1.rst new file mode 100644 index 0000000..e09408f --- /dev/null +++ b/doc/en/announce/release-6.1.1.rst @@ -0,0 +1,18 @@ +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 diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index c620d27..2a26b5c 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -28,6 +28,18 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 6.1.1 (2020-10-03) +========================= + +Bug Fixes +--------- + +- `#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 `_: 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) ========================= diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index c8730b9..5a5f0fa 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -28,7 +28,7 @@ Install ``pytest`` .. code-block:: bash $ pytest --version - pytest 6.1.0 + pytest 6.1.1 .. _`simpletest`: diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 625ced7..0492b5f 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -33,26 +33,34 @@ Plugin discovery order at tool startup ``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/ diff --git a/setup.cfg b/setup.cfg index f4170f1..60f6564 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,71 +8,71 @@ author = Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, B 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 @@ -87,8 +87,8 @@ all_files = 1 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 @@ -106,3 +106,8 @@ warn_return_any = True warn_unreachable = True warn_unused_configs = True no_implicit_reexport = True + +[egg_info] +tag_build = +tag_date = 0 + diff --git a/src/_pytest/_version.py b/src/_pytest/_version.py new file mode 100644 index 0000000..04ffab6 --- /dev/null +++ b/src/_pytest/_version.py @@ -0,0 +1,4 @@ +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control +version = '6.1.1' diff --git a/src/_pytest/config/findpaths.py b/src/_pytest/config/findpaths.py index facf30a..167b9e7 100644 --- a/src/_pytest/config/findpaths.py +++ b/src/_pytest/config/findpaths.py @@ -1,4 +1,3 @@ -import itertools import os from typing import Dict from typing import Iterable @@ -100,7 +99,7 @@ def locate_config( 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(): @@ -184,9 +183,7 @@ def determine_setup( 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 diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index e059612..34933ad 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -718,10 +718,10 @@ class TerminalReporter: 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() diff --git a/src/pytest.egg-info/PKG-INFO b/src/pytest.egg-info/PKG-INFO new file mode 100644 index 0000000..9a387bf --- /dev/null +++ b/src/pytest.egg-info/PKG-INFO @@ -0,0 +1,192 @@ +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 `_ for more examples. + + + Features + -------- + + - Detailed info on failing `assert statements `_ (no need to remember ``self.assert*`` names) + + - `Auto-discovery + `_ + of test modules and functions + + - `Modular fixtures `_ for + managing small or parametrized long-lived test resources + + - Can run `unittest `_ (or trial), + `nose `_ test suites out of the box + + - Python 3.5+ and PyPy3 + + - Rich plugin architecture, with over 850+ `external plugins `_ 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 `_ to submit bugs or request features. + + + Changelog + --------- + + Consult the `Changelog `__ 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. `_ + + 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 `_. + 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 diff --git a/src/pytest.egg-info/SOURCES.txt b/src/pytest.egg-info/SOURCES.txt new file mode 100644 index 0000000..98acdd0 --- /dev/null +++ b/src/pytest.egg-info/SOURCES.txt @@ -0,0 +1,500 @@ +.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 diff --git a/src/pytest.egg-info/dependency_links.txt b/src/pytest.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pytest.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/pytest.egg-info/entry_points.txt b/src/pytest.egg-info/entry_points.txt new file mode 100644 index 0000000..0267c75 --- /dev/null +++ b/src/pytest.egg-info/entry_points.txt @@ -0,0 +1,4 @@ +[console_scripts] +py.test = pytest:console_main +pytest = pytest:console_main + diff --git a/src/pytest.egg-info/not-zip-safe b/src/pytest.egg-info/not-zip-safe new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pytest.egg-info/not-zip-safe @@ -0,0 +1 @@ + diff --git a/src/pytest.egg-info/requires.txt b/src/pytest.egg-info/requires.txt new file mode 100644 index 0000000..bc1844a --- /dev/null +++ b/src/pytest.egg-info/requires.txt @@ -0,0 +1,27 @@ +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 diff --git a/src/pytest.egg-info/top_level.txt b/src/pytest.egg-info/top_level.txt new file mode 100644 index 0000000..e94857a --- /dev/null +++ b/src/pytest.egg-info/top_level.txt @@ -0,0 +1,2 @@ +_pytest +pytest diff --git a/testing/test_config.py b/testing/test_config.py index 0cfd11f..89fbbf8 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1375,6 +1375,21 @@ class TestRootdir: 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()) diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 57db1b9..51fdf72 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -18,6 +18,7 @@ import pytest 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 @@ -749,6 +750,29 @@ class TestTerminalFunctional: 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()