Marko Pacak
9fbd67dd4b
Class methods can now be discovered as tests ( #10552 )
...
Fix #10525
2022-12-02 15:53:04 +00:00
Daniel Scheffler
fb701b538c
Use os.sep instead of os.path.sep.
...
Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
2022-12-01 18:16:02 +01:00
Yusuke Kadowaki
62e75c7d55
Documentation update for tmp_path configurations
2022-12-01 22:29:46 +09:00
Yusuke Kadowaki
f513d33d5a
Modify documentation to use `.stash` when storing test results. ( #10535 )
2022-11-27 22:09:56 +02:00
Prerak Patel
857e34ef85
Fix bug where file system root was erroneously be used as rootdir on Windows
...
Fix #10506
2022-11-23 14:46:00 -03:00
Yusuke Kadowaki
99dfc19fe6
Fix `tmp_path_retention_policy` crash when skipping from fixture ( #10517 )
...
Also uses the stash to save the test status.
Fix #10502
2022-11-23 10:48:29 -03:00
Daniel Valenzuela
791b51d0fa
Show test name when skipping from fixture ( #10482 )
...
Fixes #10457
2022-11-18 09:20:38 -03:00
Anthony Sottile
66b28912ac
Merge pull request #10497 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-11-16 13:18:59 -05:00
Yusuke Kadowaki
cca029d55e
Add configuration options to control how `tmp_path` directories are kept ( #10442 )
...
Close #8141
2022-11-15 09:11:39 -03:00
Bruno Oliveira
d5466b3917
Fix typing errors after mypy update
2022-11-15 08:53:23 -03:00
Hugo van Kemenade
0314b50c52
Fix 'importlib.abc.TraversableResources' deprecation warning in Python 3.12 ( #10452 )
2022-10-31 12:49:51 -03:00
Cal Jacobson
549839bac5
fix type in python_api.py
...
excpected -> expected
2022-10-30 21:59:09 -05:00
Zac Hatfield-Dodds
3a68c08426
Use exceptiongroup for teardown errors
2022-10-23 15:45:50 -07:00
Itxaso Aizpurua
9e1804a6ee
Add --log-disable CLI option ( #10371 )
...
Fixes #7431
2022-10-23 18:23:34 -03:00
Anthony Sottile
59d8f8a223
_pytest._py.path: get mypy passing
2022-10-19 21:42:40 -04:00
Anthony Sottile
ed4c18f686
_pytest._py.path: combine PathBase and LocalPath
2022-10-19 21:42:40 -04:00
Anthony Sottile
6660d45521
_pytest._py.path: combine PosixPath into LocalPath
2022-10-19 21:42:40 -04:00
Anthony Sottile
af078f3a96
_pytest._py.path: combine Checkers classes
2022-10-19 21:42:40 -04:00
Anthony Sottile
73349ef3e1
_pytest._py.path: flake8 fixes
2022-10-19 21:42:40 -04:00
Anthony Sottile
63c4d45c59
_pytest._py.path: importlib mode always available
2022-10-19 21:42:40 -04:00
Anthony Sottile
eebbfc65c9
_pytest._py.error: mypy typing
2022-10-19 21:42:40 -04:00
Anthony Sottile
382209d9e9
_pytest._py.path: remove decorator compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
00e2f1c15c
_pytest._py.path: remove _cmp compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
8a151774b8
_pytest._py.path: remove fspath compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
a7c1fc204b
remove other py.* accesses in _pytest._py.path
2022-10-19 16:52:26 -04:00
Anthony Sottile
965e942dfb
use getrawcode from _pytest._code
2022-10-19 16:52:26 -04:00
Anthony Sottile
349f4bffa0
use module __getattr__ for py.error to fix doctesting
2022-10-19 16:52:26 -04:00
pre-commit-ci[bot]
49abbf2485
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-19 16:52:26 -04:00
Anthony Sottile
19dda7c9bd
vendor py.path and py.error
2022-10-19 16:52:26 -04:00
Zac Hatfield-Dodds
3dac833a52
Merge pull request #10383 from gabriellandau/dont-pdb-break-for-skiptest-exceptions
2022-10-15 11:14:26 -07:00
Zac Hatfield-Dodds
36b6384ff2
Merge pull request #10384 from tony/showlocals-negation
2022-10-15 10:43:59 -07:00
Ronny Pfannschmidt
31df38f6a7
Merge pull request #10356 from RonnyPfannschmidt/fix-7792-marks-walk-mro
...
fix #7792 : consider marks from the mro
2022-10-15 17:19:27 +02:00
Tony Narlock
2b6622fdd3
🔧 Negating --showlocals with --no-showlocals
...
This is necessary for addopts=--showlocals where individual test runs
need to not show locals.
2022-10-14 16:19:07 -05:00
Gabriel Landau
6e7917c1a0
Don't break into `pdb` for `raise unittest.SkipTest()`
2022-10-13 18:20:46 -04:00
pre-commit-ci[bot]
c543e0c4e8
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-12 08:21:17 +00:00
Ronny Pfannschmidt
f13f4360d3
Apply suggestions from code review
...
Co-authored-by: Ran Benita <ran@unusedvar.com>
2022-10-12 10:20:16 +02:00
itxasos23
78c2c48c67
Handle NFC/NFD strings that normalize to the same string. ( #10355 )
...
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2022-10-09 17:09:33 -07:00
Thomas Grainger
8a40fc5315
PytestReturnNotNoneWarning now subclasses PytestRemovedIn8Warning ( #10196 )
...
As discussed in https://github.com/pytest-dev/pytest/pull/9956#issuecomment-1132710934 .
Also added PytestRemovedIn8Warning to the reference docs.
2022-10-09 20:10:45 -03:00
Simon K
3bf2bc55b1
Add deprecations for tests written for `nose` ( #9907 )
...
Fixes #9886
2022-10-09 17:16:33 -03:00
Ronny Pfannschmidt
4e7486d3fb
fixup: annotations
2022-10-08 08:28:03 +02:00
Ronny Pfannschmidt
d8c783268c
fix #7792 : consider marks from the mro
...
closes #9105 as superseeded
2022-10-08 08:18:26 +02:00
Bruno Oliveira
3c1534944c
Merge pull request #10318 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-10-07 20:04:48 -03:00
Ran Benita
680f3e2097
Merge pull request #10327 from AA-Turner/devnul
...
Use an explicit encoding when opening `os.devnul`
2022-10-08 00:52:11 +03:00
Tony Narlock
8e7ce60c7d
Export `pytest.DoctestItem` for typing / runtime purposes ( #10313 )
...
Fixes #10312
2022-10-07 13:03:42 -03:00
Bruno Oliveira
4da0689653
Ignore mypy error about missing generic arg for catch_warnings
...
mypy stubs recently changed warnings.catch_warnings to a Generic, in
order to have proper overloads depending on the parameters passed to it, whihc
triggers this mypy error now when we subclass it:
src/_pytest/recwarn.py:170: error: Missing type parameters for generic type "catch_warnings" [type-arg]
For our porpuses the parameter is not relevant (we always use record=True), so
decided to just ignore the type error.
2022-10-07 11:30:24 -03:00
Ronny Pfannschmidt
24ef7c98e8
Merge pull request #10343 from RonnyPfannschmidt/fix-10342-warn-explicit-add-location
...
fix #10342 : put location into warning exceptions
2022-10-07 13:04:32 +02:00
Ronny Pfannschmidt
7a15bad89b
Update src/_pytest/warning_types.py
...
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-10-07 12:46:40 +02:00
Florian Bruhin
72cac9b1af
Mark tryfirst/trylast as deprecated in their docs.
...
Follow-up to #9118
2022-10-07 12:16:53 +02:00
Ronny Pfannschmidt
14919c4bbb
fix #10342 : put location into warning exceptions
...
as the warning systems own warn_explicit looses the information
we add them explicitly to the warning exceptions
2022-10-06 11:44:05 +02:00
Thierry Moisan
06007de7ba
Fix a few broken links in the documentation
2022-10-05 10:24:55 -04:00