Commit Graph

13522 Commits

Author SHA1 Message Date
Ronny Pfannschmidt 2994022753 reshape typing for hook invocation proxying 2021-03-20 23:02:03 +01:00
Ronny Pfannschmidt a550db4b6c drop internal py.path.local objects from hook calls 2021-03-20 21:50:40 +01:00
Ronny Pfannschmidt 30f1b81eb2 address #8361 - introduce hook caller wrappers that enable backward compat 2021-03-18 23:08:03 +01:00
Bruno Oliveira 35df3e68d5
Merge pull request #8459 from bluetech/unnecessary-py-path-3 2021-03-18 09:05:45 -03:00
Jürgen Gmach fb481c7e6f
fix typo (#8460) 2021-03-18 12:34:01 +01:00
Ran Benita 4690e4c510 reports: support any PathLike instead of only Path, py.path
The goal is to avoid referring to the legacy py.path.
2021-03-18 10:23:48 +02:00
Ran Benita 202dd9f423 pytester: add & use our own copytree instead of py.path's
Fixes the TODO note.
2021-03-18 10:23:48 +02:00
Ran Benita ccdadb64ea main: add Session.startpath, make Session.startdir a property that can be deprecated
Same as in Config.
2021-03-18 10:23:48 +02:00
Ran Benita 6a174afdfe terminal: move startdir attribute to a property that can be deprecated
Same as in Config.
2021-03-18 10:23:48 +02:00
Ran Benita e515264eb1 Remove yet more unnecessary py.path uses 2021-03-18 10:23:48 +02:00
Ran Benita fe215bda6b
Merge pull request #8446 from bluetech/unnecessary-py-path-2
More py.path removal work
2021-03-18 10:20:59 +02:00
Ran Benita f7efb9a01c
Merge pull request #8455 from evildmp/evolutionary-documentation-restructure
Explicitly listed the four documentation sections on index.rst
2021-03-18 09:52:31 +02:00
Ronny Pfannschmidt 6071b2c647
Merge pull request #8449 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-03-17 15:09:46 +01:00
Kale Kundert dd3709718d
Merge pull request #8453 from encukou/rel-error-message
Fix value in error message about negative relative tolerance
2021-03-16 16:43:31 -04:00
Daniele Procida 6ab461f460 Explicitly listed the four documentation sections on index.rst 2021-03-16 20:26:05 +00:00
pre-commit-ci[bot] da4abd1c82 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-03-16 19:10:55 +00:00
Petr Viktorin 43b451e95e Add tests for the error message 2021-03-16 20:09:17 +01:00
Petr Viktorin 1f131afb07 Fix value in error message about negative relative tolerance 2021-03-16 18:54:52 +01:00
Bruno Oliveira 2ce446a75f
Merge pull request #8451 from evildmp/evolutionary-documentation-restructure 2021-03-16 10:52:49 -03:00
Daniele Procida 7781582d52 Restructured global TOC
* Changed "Table Of Contents" link to a plain heading.
* Removed Customize, API Reference, 3rd party plugins links altogether.
* Added an "About the project" heading
2021-03-15 23:20:55 +00:00
Daniele Procida c83b05af6b Merge remote-tracking branch 'origin/main' into evolutionary-documentation-restructure 2021-03-15 22:28:50 +00:00
pre-commit-ci[bot] 584fd0f387
[pre-commit.ci] pre-commit autoupdate 2021-03-15 17:01:35 +00:00
Ran Benita f0c7043138 Remove/replace some more unnecessary uses of py.path 2021-03-15 10:39:44 +02:00
Ran Benita a03ee02817 config: make `collect_ignore` accept any PathLike
The main reason is to remove a reference to `py.path`.
2021-03-15 10:39:32 +02:00
Ran Benita b26d1bb18f cacheprovider: add cache.mkdir() as a Path-returning replacement to makedir()
It is not possible to change a return type in a compatible way, so a new
method is added.
2021-03-15 10:39:31 +02:00
Daniele Procida 2641761c1c
Merge pull request #8441 from evildmp/evolutionary-documentation-restructure
Moved more sections from reference to how-to.
2021-03-15 10:22:11 +02:00
Daniele Procida 64107be443 Amended plugin list script for moved file. 2021-03-14 22:44:20 +00:00
Daniele Procida d171a3f52d Moved more sections from reference to how-to.
* re-ordered and grouped how-to guides in how-to landing page
* retitled moved documents appropriately
* separated writing plugins/writing hook functions into two documents
2021-03-14 19:33:43 +00:00
Ran Benita 63bc49de70
Merge pull request #8440 from bluetech/unnecessary-py-path
Remove/replace some unneeded usages of py.path
2021-03-14 15:56:07 +02:00
Ran Benita 59251e8a2a Remove/replace some unneeded usages of py.path 2021-03-14 14:12:28 +02:00
Bruno Oliveira cdbeb03aef
Merge pull request #8442 from pytest-dev/update-plugin-list/patch-ba0193a
[automated] Update plugin list
2021-03-14 07:18:15 -03:00
pytest bot 493b54e21e [automated] Update plugin list 2021-03-14 00:49:15 +00:00
Ran Benita ba0193ad06
Merge pull request #8439 from bluetech/doc-tmpdir-reduce
doc/tmpdir: significantly reduce space dedicated to tmpdir/tmpdir_factory
2021-03-13 21:35:00 +02:00
Ran Benita 3075078498
Merge pull request #8438 from bluetech/setuptools-dash-deprecation
setup.cfg: fix setuptools dash-separator warnings
2021-03-13 20:56:13 +02:00
Ran Benita ba7bd3d77c doc/tmpdir: significantly reduce space dedicated to tmpdir/tmpdir_factory
Emphasize tmp_path/tmp_path_factory and just note the legacy ones.
2021-03-13 20:44:23 +02:00
Ran Benita 8c350b9837 setup.cfg: fix setuptools dash-separator warnings
Warnings like this:

python3.9/site-packages/setuptools/dist.py:634: UserWarning: Usage of
dash-separated 'upload-dir' will not be supported in future versions.
Please use the underscore name 'upload_dir' instead
2021-03-13 20:30:24 +02:00
Bruno Oliveira ef1308c23b
Merge pull request #8407 from nicoddemus/type-annotations-description-8405
Add type annotations to the description instead of signature
2021-03-13 14:46:37 -03:00
Ran Benita db539ed2b0
Merge pull request #8437 from bluetech/rm-typevar-prefix
Remove `_` prefix from TypeVars, expose ExceptionInfo
2021-03-13 19:01:29 +02:00
Bruno Oliveira 9fa6673222
Merge pull request #8434 from evildmp/evolutionary-documentation-restructure 2021-03-13 12:50:45 -03:00
Pierre Mourlanne af9f27a874
Approx decimal sequence mapping (#8422) 2021-03-13 16:01:23 +02:00
Ran Benita f2d65c85f4 code: export ExceptionInfo for typing purposes
This type is most prominent in `pytest.raises` and we should allow to
refer to it by a public name.

The type is not in a perfectly "exposable" state. In particular:

- The `traceback` property with type `Traceback` which is derived from
  the `py.code` API and exposes a bunch more types transitively. This
  stuff is *not* exported and probably won't be.

- The `getrepr` method which probably should be private.

But they're already used in the wild so no point in just hiding them
now.

The __init__ API is hidden -- the public API for this are the `from_*`
classmethods.
2021-03-13 15:59:44 +02:00
Ran Benita 96ef7d678b code: fix outdated reference in ExceptionInfo.exconly docstring
No such thing as `_pytest._code.AssertionError`, it's just the built-in
`AssertionError`.
2021-03-13 14:44:50 +02:00
Ran Benita 5bbfb4e058 Remove `_` prefix from TypeVars which appear in public API
The prefixes make the API Reference docs (for e.g. `pytest.raises`,
`pytest.fixture`) uglier.

Being under `_pytest` is sufficient from a privacy perspective, so let's
drop them.
2021-03-13 14:44:50 +02:00
Daniele Procida dd576509e1
Merge branch 'main' into evolutionary-documentation-restructure 2021-03-13 12:09:36 +00:00
Bruno Oliveira 146eda93e7
Merge pull request #8436 from pytest-dev/doc-fix-toc
doc: fix broken links in left-hand TOC
2021-03-13 08:24:35 -03:00
Ran Benita 639c4e64a1 doc: fix broken links in left-hand TOC
Due to recent renamings.
2021-03-13 12:44:30 +02:00
Daniele Procida 843e9eac2c Added myself to AUTHORS 2021-03-12 23:14:18 +00:00
Daniele Procida 8410d9ac54 Created a new Explanation section and new landing pages for main sections.
Added landing pages for:

How-to guides
Reference guides
Explanation

Added links to the main landing pages to the sidebar.
2021-03-12 22:57:53 +00:00
Daniele Procida ff2ee96b8c Split fixtures documentation into separate documents.
Sections have been moved to:

* reference/fixtures.rst
* how-to/fixtures.rst
* fixtures.rst

according to their function. Further refinement and rewriting will be required.

Some material has been moved to a new "Anatomy of a test" document, in
anticipation that material from other sections will also find a natural
home there later.

Removed several unneeded reference targets from fixtures documentation.
2021-03-12 22:16:47 +00:00
Bruno Oliveira 32ad70dea8
Merge pull request #8433 from evildmp/evolutionary-documentation-restructure
Added how-to and reference directories.
2021-03-11 19:26:09 -03:00