Commit Graph

13259 Commits

Author SHA1 Message Date
Ran Benita 69c302479e mark: export pytest.MarkDecorator for typing purposes
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-20 15:59:06 +02:00
Ran Benita 2ec372df8b mark: export pytest.Mark for typing purposes
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-20 15:58:49 +02:00
Ran Benita 89dcfbf293
Merge pull request #8168 from antonblr/testdir-to-pytester-incr2
tests: Migrate to pytester - final update
2020-12-19 13:32:20 +02:00
antonblr 196b173c8a address comments 2020-12-18 12:36:20 -08:00
antonblr 15156e94c4 tests: Migrate to pytester - final update 2020-12-18 11:02:38 -08:00
Anthony Sottile f14ab08de3
Merge pull request #8172 from pytest-dev/revert-8171-fix-ci-setup-python
Use new pypy3 github actions syntax
2020-12-18 11:01:48 -08:00
Anthony Sottile 293a7c962d
Use new pypy3 github actions syntax 2020-12-18 10:45:28 -08:00
Anthony Sottile 4da445dc2e
Revert "infra: Temporary pin setup-python GH action to v2.1.4" 2020-12-18 10:44:20 -08:00
Bruno Oliveira 403424d60b
Merge pull request #8171 from antonblr/fix-ci-setup-python
infra: Temporary pin setup-python GH action to v2.1.4
2020-12-18 08:02:44 -03:00
antonblr 1264404fe7 infra: Temporary pin setup-python GH action to v2.1.4 2020-12-17 21:01:20 -08:00
Adam Johnson bd894e3065
Add Changelog to setup.cfg (#8166)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-12-17 13:55:36 -03:00
Bruno Oliveira ce206ae462
Merge pull request #8162 from nicoddemus/rm-travis-badge 2020-12-17 09:10:21 -03:00
Bruno Oliveira 3eef150f2e Remove other references to Travis 2020-12-17 08:19:50 -03:00
Ran Benita 02e69e5cdc
Merge pull request #8152 from bluetech/empty-skip
terminal: fix "(<Skipped instance>)" skip reason in test status line
2020-12-17 12:58:00 +02:00
Bruno Oliveira 8255effc5b Remove Travis badge from README
Since we stopped testing Python 3.5, we no longer use Travis.
2020-12-16 15:43:58 -03:00
Chris NeJame 534d174fd2
Clarify fixture execution order and provide visual aids (#7381)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-12-16 13:53:14 -03:00
Bruno Oliveira cab16f3aac
Use transparent PNG for logo (#8159) 2020-12-16 11:19:45 -03:00
Bruno Oliveira a1c5111a40 Fix events variable in prepare-release-pr.yml 2020-12-16 07:53:05 -03:00
Bruno Oliveira f1a1de2257
Use manual trigger to prepare release PRs (#8150)
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-12-16 07:50:02 -03:00
Ran Benita d46ecbc18b terminal: fix "(<Skipped instance>)" skip reason in test status line 2020-12-15 22:24:25 +02:00
Bruno Oliveira 950fbbc326
Merge pull request #8151 from nicoddemus/cherry-pick-release
Merge pull request #8149 from pytest-dev/release-6.2.1
2020-12-15 15:58:13 -03:00
Bruno Oliveira 56600414df Merge pull request #8149 from pytest-dev/release-6.2.1
Prepare release 6.2.1

(cherry picked from commit a566eb9c7085d7732127420bd7ce5ec1f7319fba)
2020-12-15 12:41:02 -03:00
Jakob van Santen 9ccbf5b899
python_api: handle array-like args in approx() (#8137) 2020-12-15 08:49:29 -03:00
Ran Benita 6c899a0afa
Merge pull request #8144 from bluetech/py-to-pathlib-4
hookspec: add pathlib.Path alternatives to py.path.local parameters in hooks
2020-12-15 13:06:06 +02:00
Anton 8eef8c6004
tests: Migrate to pytester - incremental update (#8145) 2020-12-15 13:02:32 +02:00
Ran Benita 592b32bd69 hookspec: add pathlib.Path alternatives to py.path.local parameters in hooks
As part of the ongoing migration for py.path to pathlib, make sure all
hooks which take a py.path.local also take an equivalent pathlib.Path.
2020-12-15 00:34:23 +02:00
Ran Benita 2cb34a99cb Some py.path.local -> pathlib.Path 2020-12-15 00:29:13 +02:00
Bruno Oliveira cb8142b8ec
Merge pull request #8139 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-html-3.1.1
build(deps): bump pytest-html from 3.1.0 to 3.1.1 in /testing/plugins_integration
2020-12-14 08:13:44 -03:00
Bruno Oliveira 382cb2aae1
Merge pull request #8138 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-bdd-4.0.2
build(deps): bump pytest-bdd from 4.0.1 to 4.0.2 in /testing/plugins_integration
2020-12-14 08:13:22 -03:00
dependabot[bot] a09d8b1599
build(deps): bump pytest-html in /testing/plugins_integration
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/v3.1.0...v3.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 03:07:30 +00:00
dependabot[bot] 92b444a914
build(deps): bump pytest-bdd in /testing/plugins_integration
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/pytest-dev/pytest-bdd/releases)
- [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-bdd/compare/4.0.1...4.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 03:07:27 +00:00
Ran Benita ad65e816e4
Merge pull request #8111 from antonblr/testdir-to-pytester-python
tests: Migrate testing/python to pytester fixture
2020-12-13 23:19:31 +02:00
antonblr 4ed9a38519 tests: Migrate testing/python to pytester fixture 2020-12-13 07:42:12 -08:00
Bruno Oliveira 7e2e6630ad
Merge pull request #8123 from nicoddemus/import-mismatch-unc
Compare also paths on Windows when considering ImportPathMismatchError
2020-12-13 10:35:11 -03:00
Ran Benita fa784e1436
Merge pull request #8104 from bot2x/patch-1
migrates test_warnings.py from testdir to pytester
2020-12-13 15:21:37 +02:00
bot2x 28588bf535 migrates test_warnings.py from testdir to pytester 2020-12-13 14:13:49 +02:00
Ran Benita 37b154b1ec
Merge pull request #8122 from bluetech/py-to-pathlib-3
Some py.path.local -> pathlib.Path
2020-12-13 10:54:19 +02:00
Ran Benita 09582048be
Merge pull request #8131 from bluetech/cherry-pick-release
Merge pull request #8130 from pytest-dev/release-6.2.0
2020-12-12 23:28:31 +02:00
Ran Benita 54a7356a9f Merge pull request #8130 from pytest-dev/release-6.2.0
Prepare release 6.2.0

(cherry picked from commit c475106f12ed87fe908544ff383c5205638c086d)
2020-12-12 23:23:19 +02:00
Ran Benita 683f29f84d
Merge pull request #8129 from bluetech/docs-pygments-workaround
doc: temporary workaround for pytest-pygments lexing error
2020-12-12 22:31:10 +02:00
Ran Benita 0feeddf8ed doc: temporary workaround for pytest-pygments lexing error
pytest-pygments doesn't yet recognize the skip reason in summary line
added recently. Workaround it until we get to updating it.
2020-12-12 22:18:23 +02:00
Ran Benita b478275777
Merge pull request #8128 from bluetech/skip-reason-empty
terminal: when the skip/xfail is empty, don't show it as "()"
2020-12-12 22:18:06 +02:00
Ran Benita 3302ff9949 terminal: when the skip/xfail is empty, don't show it as "()"
Avoid showing a line like

    x.py::test_4 XPASS ()   [100%]

which looks funny.
2020-12-12 22:09:00 +02:00
Ran Benita 59bd0f6912
Merge pull request #8126 from bluetech/tox-regen-pretend-scm2
tox: use pip legacy resolver for regen job
2020-12-12 20:50:10 +02:00
Ran Benita 6298ff1f4e tox: use pip legacy resolver for regen job
The env var effects all of the pip installs, including regendoc which
also uses setuptools-scm, so it gets the wrong version, and fails to
install with the new pip resolver:

    ERROR: Requested regendoc from 206e495142e223858fee890eed0188/regendoc-0.6.1.tar.gz#sha256=db1e8c9ae02c1af559eae105bfd77ba41ed07fc8ca7030ea59db5f3f161236a4 has different version in metadata: '6.2.0'
2020-12-12 20:27:59 +02:00
Ran Benita d51ecbd44d
Merge pull request #8125 from bluetech/tox-rm-pip-req
tox: remove requires: pip>=20.3.1
2020-12-12 19:11:27 +02:00
Ran Benita f237b077fc tox: remove requires: pip>=20.3.1
Causes some trouble in CI and not really needed as old pip should still
work.
2020-12-12 18:31:52 +02:00
Ran Benita 95e0e19b8d
Merge pull request #8124 from bluetech/s0undt3ch-feature/skip-context-hook
Add `pytest_markeval_namespace` hook.
2020-12-12 18:14:02 +02:00
Anton cf1051cfba
infrastructure: Stricter tox dependensies (#8119) 2020-12-12 18:08:15 +02:00
Pedro Algarvio b16c091253 Add `pytest_markeval_namespace` hook.
Add a new hook , `pytest_markeval_namespace` which should return a dictionary.
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.

Pseudo example

``conftest.py``:

.. code-block:: python
   def pytest_markeval_namespace():
       return {"color": "red"}
``test_func.py``:

.. code-block:: python
   @pytest.mark.skipif("color == 'blue'", reason="Color is not red")
   def test_func():
       assert False
2020-12-12 17:41:37 +02:00