Commit Graph

948 Commits

Author SHA1 Message Date
Alessio Bogon 2a649afa10
Merge pull request #573 from drothlis/rootdir 2022-11-04 20:09:50 +01:00
David Röthlisberger df7af76c6c Add changelog entry for bdd_features_base_dir change 2022-11-04 19:04:29 +00:00
David Röthlisberger 3243232fb0 bdd_features_base_dir is relative to pytest rootdir
The pytest rootdir is the directory containing pytest.ini (or similar):
https://docs.pytest.org/en/latest/reference/customize.html#rootdir

This allows you to run pytest when the current working directory isn't
the same as the directory containing the tests. I need to do that
because in my system, the directory containing the tests is on a
read-only filesystem.
2022-11-04 10:42:40 +00:00
Alessio Bogon ab9903b8dd
Merge pull request #572 from drothlis/pytester
tests: Use `pytester` fixture instead of `testdir`
2022-11-04 11:33:10 +01:00
David Röthlisberger 0bcb4b86b2 tests: Fix typing import 2022-11-04 09:51:48 +00:00
David Röthlisberger c8677a7783 tests: Use `pytester` fixture instead of `testdir`
`testdir` is deprecated. It's identical to `pytester`, except that
`testdir` returns `py.path` objects whereas `pytester` returns Python
stdlib `Path` objects. So I had to update usages of those paths.

`pytester` was added in pytest 6.2, which is our minimum supported
version.
2022-11-04 08:53:07 +00:00
Alessio Bogon 3f6dc8744f
Merge pull request #570 from drothlis/drop-glob2 2022-11-03 22:39:40 +01:00
David Röthlisberger 8123f7ab83 Drop dependency on glob2
The standard library's `glob` supports "**" since Python 3.5.
pytest-bdd requires Python >= 3.7.
2022-11-03 21:25:14 +00:00
Alessio Bogon 33fbca4bf2
Merge pull request #571 from drothlis/py-io
Drop dependency on py.io
2022-11-03 21:51:31 +01:00
David Röthlisberger 411afa6f82 tox.ini: Remove unsupported pytest versions < 6.2
These aren't used in the `envlist` earlier in `tox.ini`.
`CHANGES.rst` says we require pytest>=6.2.
2022-11-03 13:01:48 +00:00
David Röthlisberger 72d49f35b6 Don't fall back to importing from `py.io`
We require pytest>=6.2; `_pytest._io.TerminalWriter` exists since
6.0.0rc1. See the previous commit for details.
2022-11-03 13:01:35 +00:00
David Röthlisberger 36e81cb924 Drop dependency on py.io
Pytest 7.2.0 dropped its dependency on the `py` package. We don't
specify `py` explicitly as a dependency, so tests starting failing since
the release of pytest 7.2.0.

To drop this dependency, pytest vendored `py.io.TerminalWriter` into
`_pytest._io` in pytest commit 276405a03 (6.0.0rc1). It looks like we
still support pytest 5.0 —at least it's listed in tox.ini— so I fall
back to importing from `py.io` if it isn't present in `_pytest`.

This was our only direct use of the `py` library.
2022-11-03 12:58:24 +00:00
Alessio Bogon 6ea28d3a4b
Merge pull request #565 from pytest-dev/pre-commit-ci-update-config 2022-10-11 09:28:10 +02:00
pre-commit-ci[bot] fb7ede3df1
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/asottile/pyupgrade: v2.38.2 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.1.0)
2022-10-11 00:33:02 +00:00
Alessio Bogon 078d95628f
Merge pull request #564 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-09-27 20:06:40 +02:00
pre-commit-ci[bot] abac9638ce
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2)
2022-09-26 23:35:35 +00:00
Alessio Bogon edc18aa7e6
Merge pull request #563 from pytest-dev/pep-561-compliance
Make the package PEP 561 compatible.
2022-09-24 19:24:13 +02:00
Alessio Bogon b5b3d18e0f Add link to PR 2022-09-24 19:18:11 +02:00
Alessio Bogon c6a4bffb49 Make the package PEP 561 compatible...
... by adding the `py.typed` file.
2022-09-24 14:15:10 +02:00
Alessio Bogon 996d09524a
Merge pull request #561 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-09-20 08:22:20 +02:00
pre-commit-ci[bot] 6fe81ad3be
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.3 → v2.38.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v2.38.0)
2022-09-19 23:25:03 +00:00
Alessio Bogon 75ca078902
Merge pull request #560 from pytest-dev/dependabot/pip/mako-1.2.2
Bump mako from 1.2.1 to 1.2.2
2022-09-17 06:48:43 +02:00
dependabot[bot] 3e16ed562e
Bump mako from 1.2.1 to 1.2.2
Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/sqlalchemy/mako/releases)
- [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/mako/commits)

---
updated-dependencies:
- dependency-name: mako
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-16 19:23:55 +00:00
Alessio Bogon 2ff1aa7f13
Merge pull request #558 from pytest-dev/pre-commit-ci-update-config 2022-09-06 09:18:50 +02:00
pre-commit-ci[bot] 181181e5e8
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
2022-09-05 23:33:38 +00:00
Alessio Bogon e34d027260
Update CHANGES.rst 2022-08-28 12:48:33 +02:00
Alessio Bogon 2325f66c19
Update CHANGES.rst 2022-08-28 12:46:41 +02:00
Alessio Bogon d7835e59bc
Merge pull request #557 from glehmann/tracebackhide
hide pytest-bdd internal method in user tracebacks
2022-08-28 12:44:24 +02:00
Gaëtan Lehmann 64e2086cdf hide pytest-bdd internal method in user traceback 2022-08-26 14:24:14 +02:00
Alessio Bogon f6865058c3
Merge pull request #554 from pytest-dev/misc-internal-improvements
Misc internal improvements
2022-08-20 12:26:47 +02:00
Alessio Bogon bf5817948a Remove useless docstrings 2022-08-20 12:25:54 +02:00
Alessio Bogon 5ffe96c81d Simplify code by using dataclasses 2022-08-20 12:11:45 +02:00
Alessio Bogon 070541d707 Do not use eagerly load into a set if not necessary 2022-08-20 11:52:29 +02:00
Alessio Bogon e54a320bd0
Merge pull request #552 from pytest-dev/src-dir-structure
Use src-based project structure
2022-08-19 21:21:00 +02:00
Alessio Bogon d080736898 Fix coverage config 2022-08-14 11:19:12 +02:00
Alessio Bogon 8a2074308f Fix mypy config 2022-08-14 10:36:52 +02:00
Alessio Bogon 9301e97dce Use src/ based directory structure 2022-08-14 10:34:33 +02:00
Alessio Bogon dcbc3bc4d8 Remove ignored locations 2022-08-14 10:33:31 +02:00
Alessio Bogon 6efbc36f86 Fix readthedocs build 2022-08-14 10:18:01 +02:00
Alessio Bogon 688eeb040b Fix readthedocs build 2022-08-14 10:12:52 +02:00
Alessio Bogon c5568af6f2
Merge pull request #548 from pytest-dev/step-advanced-usecases
Step advanced usecases
2022-08-14 10:09:16 +02:00
Alessio Bogon 9ecf4bf98e Update deps 2022-08-14 10:05:24 +02:00
Alessio Bogon 8facaaec5a Adjust text 2022-08-14 10:02:02 +02:00
Alessio Bogon b7e0a2bc33 Fix docs build 2022-08-14 10:01:51 +02:00
Alessio Bogon f8ad87c222 Add docstring for `stacklevel` param 2022-08-14 09:50:54 +02:00
Alessio Bogon c7d3a1edfd Move function 2022-08-14 09:50:38 +02:00
Alessio Bogon 1ecd85171e fix type 2022-08-14 09:50:16 +02:00
Alessio Bogon c9e592f7e2 Rename var 2022-08-14 09:49:29 +02:00
Alessio Bogon a9bf37b37d Add changelog entries 2022-08-13 12:03:26 +02:00
Alessio Bogon 7327fc49ca Explain the trick 2022-08-13 12:01:46 +02:00