Zac Hatfield-Dodds
f617bab0a2
Update pre-commit config
2023-06-30 15:07:07 -07:00
Zac Hatfield-Dodds
f4e3b4ad98
Drop Python 3.7
2023-06-30 14:55:42 -07:00
Ran Benita
310b67b227
Drop attrs dependency, use dataclasses instead ( #10669 )
...
Since pytest now requires Python>=3.7, we can use the stdlib attrs
clone, dataclasses, instead of the OG package.
attrs is still somewhat nicer than dataclasses and has some extra
functionality, but for pytest usage there's not really a justification
IMO to impose the extra dependency on users when a standard alternative
exists.
2023-01-20 11:13:36 +02:00
Wolfremium
70cac3d464
Explicit note that tmpdir fixture is discouraged in favour of tmp_path #9937 ( #10138 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: kevin.hierro-ext <kevin.hierro-ext@clarity.ai>
Co-authored-by: Dani Sancas <lord.sancas@gmail.com>
2022-07-15 08:40:18 -03:00
Bruno Oliveira
a1ed6839e3
Refer to py.path.local instead of LEGACY_PATH constant for better docs
2022-05-17 08:09:21 -03:00
Ezio Melotti
296b642eb3
Fix rst markup in TempdirFactory's docstring.
2022-05-17 07:29:32 +02:00
Bruno Oliveira
4038752bf3
Ensure Config.inifile is available during pytest_cmdline_main
...
Fix #9396
2022-01-04 10:03:28 -03:00
Ran Benita
3128080806
pytest: bring back direct imports of TempdirFactory, Testdir
...
The monkeypatch approach doesn't work for `import pytest;
pytest.TempdirFactory`.
Fix #9432 .
2021-12-25 13:27:02 +02:00
Ran Benita
63899c76a4
legacypath: support late-loading of pytester plugin
...
Fixes #9280 .
Previous approach didn't support pytester being loaded using
`pytest_plugins = "pytester"` in a conftest.
2021-11-08 21:56:40 +02:00
Ran Benita
e6eac28f0e
legacypath: only add `testdir` and `tmpdir` fixtures if corresponding plugins are registered
...
This preserves the existing behavior and gives a proper error message
in case e.g. `testdir` is requested without the `pytester` plugin being
loaded.
2021-10-29 13:11:12 +03:00
Ran Benita
c3dff755af
Move Node.fspath to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
ce7cff9f8e
Move pathlist support to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
d9ca55c648
Move Session.startdir to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
84722a7904
Move Config.{invocation_dir,rootdir,inifile} to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
d979f82fb0
Move TerminalReporter.stardir to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
7c0011374c
Move FixtureRequest.fspath to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
a1a605a63e
Move Cache.makedir to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
5e883f5195
Move tmpdir to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
1df28a4450
Move testdir to legacypath plugin
2021-10-28 21:51:51 +03:00
Ran Benita
c2ece58aa0
Add legacypath plugin
2021-10-27 09:31:44 +03:00