pytest bot
fadfb4f346
Prepare release version 7.1.3
2022-08-31 17:49:55 +00:00
Gergely Kalmár
71b79fcda5
[7.1.x] Ignore editable installation modules
2022-08-26 12:48:36 +00:00
github-actions[bot]
6f8c4fa742
[7.1.x] JUnit XML: Escape error messages in setup/teardown ( #10207 )
...
Co-authored-by: holesch <8659229+holesch@users.noreply.github.com>
2022-08-12 10:06:32 +00:00
Wolfremium
da7daaac92
[7.1.x] Explicit note that tmpdir fixture is discouraged in favour of tmp_path #9937
2022-07-15 11:41:58 +00:00
Nipunn Koorapati
9b3affc006
[7.1.x] Add typing for FixtureRequest.param
2022-07-14 23:37:36 +00:00
Anthony Sottile
199367168b
[7.1.x] replace atomicwrites with os.replace
...
(cherry picked from commit 7dc540f258
)
2022-07-08 19:13:28 -07:00
Anthony Sottile
549e3136cc
[7.1.x] Pass importmode to import_path in DoctestModule
2022-06-30 05:46:18 -07:00
Bruno Oliveira
9a16e69835
[7.1.x] Do not call tearDown for skipped unittest.TestCases with --pdb
2022-06-28 15:51:30 +00:00
Bruno Oliveira
0e7a6a769e
[7.1.x] Use PurePath directly instead of os.path.sep in rewrite.py
2022-06-27 13:00:17 +00:00
Zach OBrien
dc0812610d
[7.1.x] Fix representation of tuples in approx
2022-06-14 09:56:12 +00:00
pytest bot
2f2f1a601e
Prepare release version 7.1.2
2022-04-23 11:33:44 +00:00
Zac Hatfield-Dodds
3a7ead6bcf
[7.1.x] fix: move 'import getpass' statement to try-clause
2022-04-21 02:46:24 +00:00
Hugo van Kemenade
ddbb998aed
[7.1.x] Increase stacklevel to point at user's code
2022-04-20 16:09:01 +00:00
Anthony Sottile
5ef96fdb53
[7.1.x] fix comparison of dataclasses with `InitVar`
2022-04-09 00:48:09 +00:00
Kian Eliasi
78356dc353
[7.1.x] Remove unnecessary numpy import
2022-03-21 01:35:22 +00:00
pytest bot
0ffe9e0742
Prepare release version 7.1.1
2022-03-17 20:21:30 +00:00
Ran Benita
f1df8074b3
[7.1.x] config: restore pre-pytest 7.1.0 confcutdir exclusion behavior
2022-03-17 16:15:03 +00:00
pytest bot
d53a5fb371
Prepare release version 7.1.0
2022-03-13 13:43:44 +00:00
Bruno Oliveira
e38d1cac48
Improve error message for malformed pyproject.toml files
...
Including the file name is enough to let the user know what the problem is.
The same is not needed for `.ini` files because the error message includes the path to the file by default.
Fix #9730
2022-03-05 08:59:28 -03:00
Bruno Oliveira
f943d1944a
pytester now requests monkeypatch instead of creating its own instance
...
It is tempting to use `monkeypatch` to replace the other mechanisms in pytester which change global
state: `CwdSnapshot`, `SysModulesSnapshot`, `SysPathsSnapshot`, however those are more delicate
than they look at first glance so leaving those alone for now.
Close #9708
2022-03-04 08:58:44 -05:00
Bruno Oliveira
5f3d94c47e
Disallow unordered sequences in pytest.approx ( #9709 )
...
Fix #9692
2022-02-24 10:16:35 -03:00
Bruno Oliveira
bcc826d0fb
Fix numbering and improve changelog entry for #9362 ( #9713 )
2022-02-23 19:03:13 -03:00
Ran Benita
7b6e477e2f
Revert "Deprecate raising unittest.SkipTest to skip tests during collection" ( #9710 )
...
This reverts commit 25e657bfc1
.
Turns out that this *is* a working unittest feature, which pytest should
support, so undo the deprecation.
2022-02-23 15:59:54 +02:00
Bruno Oliveira
9af3e23695
Expand warnings output for ResourceWarning ( #9682 )
...
Fix #9644
2022-02-15 13:00:50 +00:00
Bruno Oliveira
fac8f284cd
Fix diff output for data types where `-v` would show less information ( #9661 )
...
Close #5192
2022-02-15 09:43:20 -03:00
Ran Benita
afe41e5273
Merge pull request #9678 from bluetech/consistent-idval
...
python: unify code to generate ID from value
2022-02-15 13:23:35 +02:00
eduardo naufel schettino
c9cf2d4424
Fix count of selected tests on terminal collection summary ( #9628 )
2022-02-15 11:17:34 +00:00
Bruno Oliveira
747b8372ea
Try to import module before creating dummy modules with 'importmode=importlib'
...
The dummy modules we introduce in `insert_missing_modules` (due to #7856 and #7859 )
would cause problems if the dummy modules actually end up replacing modules
which could be imported normally because they are available in `PYTHONPATH`.
Now we attempt to first import the module via normal mechanisms, and only
introduce the dummy modules if the intermediary modules don't actually exist.
Close #9645
2022-02-14 09:42:05 -03:00
Ran Benita
c3aa4647c7
python: unify code to generate ID from value
...
In the following
@pytest.mark.parametrize(..., ids=[val])
the ID values are only allowed to be `str`, `float`, `int` or `bool`.
In the following
@pytest.mark.parametrize(..., [val])
@pytest.mark.parametrize(..., [pytest.param(..., id=val])
a different code path is used, which also allows `bytes`, `complex`,
`re.Pattern`, `Enum` and anything with a `__name__`.
In the interest of consistency, use the latter code path for all cases.
2022-02-12 19:22:37 +02:00
Bruno Oliveira
68be319165
Merge pull request #9674 from pytest-dev/release-7.0.1
...
(cherry picked from commit 18d35b817d
)
2022-02-11 15:52:00 -03:00
Bruno Oliveira
3586edc1c9
Merge pull request #9646 from nicoddemus/9643-delay-warning
2022-02-10 14:11:21 -03:00
Bruno Oliveira
88c35123b8
Delay warning about collector/item diamond inheritance
...
This allows that warning to be filtered by `filterwarnings`.
Fix #9643
2022-02-10 13:50:25 -03:00
Ran Benita
2b6708b892
Merge pull request #9624 from bluetech/unittest-getobj
...
unittest: restore `UnitTestFunction.obj` to return unbound rather than bound method
2022-02-09 22:43:31 +02:00
Ran Benita
01e1de7a1a
Rename ``pythonpath`` plugin to ``python_path``
...
Fix #9636 .
2022-02-09 10:03:20 +02:00
Ran Benita
44290d1f6c
Merge pull request #9609 from kdelee/patch-1
...
importlib.readers not valid until python 3.10
2022-02-08 15:57:48 +02:00
Anthony Sottile
2442034a1e
allow running testids which contain :: in the parametrized portion
2022-02-07 20:19:59 -05:00
Ran Benita
d00ca3f8e5
unittest: restore `UnitTestFunction.obj` to return unbound rather than bound method
...
This fixes #9610 .
pytest 7.0.0 (unintentionally) changed `UnitTestFunction.obj`'s' behavior
to match `Function.obj`. That is probably a good thing to have, however
it evidently causes some regressions as described in the issue, so
restore the previous behavior for now. In the future we might want to
make this change again, but with proper consideration.
2022-02-08 00:46:00 +02:00
Bruno Oliveira
66dc79efd4
Update changelog/9608.bugfix.rst
...
Co-authored-by: Elijah DeLee <kdelee@redhat.com>
2022-02-08 00:44:52 +02:00
Bruno Oliveira
5f1a2f33da
Fix invalid importing of `importlib.reader` in Python 3.9
...
Fix #9608
2022-02-08 00:44:52 +02:00
Florian Bruhin
dfa7023862
Prepare release 7.0.0 ( #9598 ) ( #9604 )
...
* Prepare release version 7.0.0
* Add note to changelog
Co-authored-by: pytest bot <pytestbot@gmail.com>
Co-authored-by: Florian Bruhin <me@the-compiler.org>
(cherry picked from commit e37fbe5685
)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-04 07:48:24 -03:00
Florian Bruhin
ee9ddff34e
doc: Recategorize 7.0.0 changelog items ( #9561 )
2022-01-27 12:39:32 +00:00
Florian Bruhin
597bb9376b
Add missing cooperative constructor changelog ( #9559 )
...
This was supposed to be part of #9488 , but I only now noticed it was lying around uncommitted in my git dir
2022-01-27 13:33:09 +01:00
Akuli
a17e708352
With -vv, display the full skip/xfail reason instead of "..." ( #9537 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-25 10:33:22 -03:00
Brett Holman
3f44b4078c
Add test coverage to test rewrite
2022-01-18 11:26:46 -07:00
Olga Matoula
2ad1b589af
Add docs on pytest.warns(None) deprecation ( #9495 )
...
* Add docs on pytest.warns(None) deprecation
* Add new section for common warnings use cases
* Fix references for warnings use cases
* Fix reference link
2022-01-13 18:32:22 +00:00
Emmanuel Arias
0fe0b78a9f
Improve on configuration file docs section
...
To avoid confusions the part of that "the configuration file can
be locate on your tests folder" is removed.
2022-01-13 12:52:18 -03:00
Ran Benita
0ef882364e
config: stop resolving symlinks in conftest paths
...
This became the wrong thing to do since
322190fd84
.
2022-01-09 12:33:45 +02:00
Bruno Oliveira
4038752bf3
Ensure Config.inifile is available during pytest_cmdline_main
...
Fix #9396
2022-01-04 10:03:28 -03:00
Hasan Ramezani
5599c5ad45
Drop Python3.6 in CI, setup.cfg, and readme.
2021-12-26 21:08:37 +01:00
Yuval Shimon
897395afd5
fix 9326
2021-12-12 14:38:45 +02:00