Florian Bruhin
61be48b485
Fix test_collect_symlink_dir on Windows
2021-05-04 17:25:08 +02:00
Florian Bruhin
e354c5c919
Fix warning filters used in tests
2021-05-04 17:25:02 +02:00
Florian Bruhin
710446420c
Adjust enum reprs for Python 3.10
...
Potential fix for #8546
2021-05-04 17:24:50 +02:00
dependabot[bot]
f1a97512da
Bump anyio[curio,trio] in /testing/plugins_integration
...
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio ) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/agronholm/anyio/releases )
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst )
- [Commits](https://github.com/agronholm/anyio/compare/3.0.0...3.0.1 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 03:01:15 +00:00
Tarcísio Fischer
9d9b84d175
Improve pytest.approx error messages readability (Pull request) ( #8429 )
...
Improve pytest.approx error messages readability (Pull request)
2021-04-30 07:36:56 -03:00
Parth Patel
992c403fc8
Improve `iterparentnodeids` to consume `/` parts until the first `::` ( #8577 )
...
* Fix issue where TestCase.setUpClass is not called for test methods with a / in its name by checking if there is :: before the selected / or any :: after. Also added a test case for this.
* removed print statement that was added
* Change iterparentnodeids to consume / parts until the first ::. Then consider ::. Tests were changed to reflect this.
* Update changelog/8509.improvement.rst
Co-authored-by: Ran Benita <ran@unusedvar.com>
2021-04-29 17:02:43 +03:00
Ran Benita
134d8f78d8
Merge pull request #8595 from nschloe/url-fixes
...
"fix" a couple of http -> https redirects
2021-04-26 20:05:32 +03:00
Nico Schlömer
9ef608ef76
"fix" a couple of http -> https redirects
...
Found with
urli-fix . -a http: -i pytest
2021-04-26 17:44:27 +02:00
Bruno Oliveira
1e2c2d972d
Merge pull request #8588 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-asyncio-0.15.1
...
Bump pytest-asyncio from 0.15.0 to 0.15.1 in /testing/plugins_integration
2021-04-26 10:44:01 -03:00
Bruno Oliveira
0d0e5ed74a
Merge pull request #8589 from pytest-dev/dependabot/pip/testing/plugins_integration/anyio-curiotrio--3.0.0
...
Bump anyio[curio,trio] from 2.2.0 to 3.0.0 in /testing/plugins_integration
2021-04-26 10:43:55 -03:00
dependabot[bot]
8d93f6ff0b
Bump pytest-mock from 3.5.1 to 3.6.0 in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.5.1...v3.6.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 03:01:18 +00:00
dependabot[bot]
11f6dc9de6
Bump anyio[curio,trio] in /testing/plugins_integration
...
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio ) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/agronholm/anyio/releases )
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst )
- [Commits](https://github.com/agronholm/anyio/compare/2.2.0...3.0.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 03:01:15 +00:00
dependabot[bot]
5a7be03285
Bump pytest-asyncio in /testing/plugins_integration
...
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio ) from 0.15.0 to 0.15.1.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases )
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.15.0...v0.15.1 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 03:01:13 +00:00
Anthony Sottile
67af623d9e
Merge pull request #8227 from encukou/defensive-get_source
...
Make code.FormattedExcinfo.get_source more defensive
2021-04-24 19:42:53 -07:00
Miro Hrončok
0a75c8e57b
Add a regression test for a more defensive code.FormattedExcinfo.get_source
2021-04-22 19:17:54 +02:00
Ran Benita
513247863a
Merge pull request #8562 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-asyncio-0.15.0
...
Bump pytest-asyncio from 0.14.0 to 0.15.0 in /testing/plugins_integration
2021-04-20 16:25:57 +03:00
Miroslav Šedivý
fbe66244b8
Fix some typos, remove redundant words and escapes ( #8564 )
...
* doc: Fix typos, remove double words
* Remove redundant escapes in regex
2021-04-19 20:39:08 +00:00
dependabot[bot]
fb35851440
Bump pytest-asyncio in /testing/plugins_integration
...
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio ) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases )
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.14.0...v0.15.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 03:01:33 +00:00
Abdelrahman Elbehery
9078c3ce23
fix #8464 wrong root dir when -c is passed ( #8537 )
...
fix #8464 wrong root dir when -c is passed
2021-04-16 14:38:35 -03:00
Ran Benita
3c451751af
Merge pull request #8542 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.2.0
...
Bump pytest-django from 4.1.0 to 4.2.0 in /testing/plugins_integration
2021-04-14 12:50:28 +03:00
Ran Benita
6152135c29
Merge pull request #8541 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.2
...
Bump django from 3.1.8 to 3.2 in /testing/plugins_integration
2021-04-14 12:50:01 +03:00
pre-commit-ci[bot]
d200598de9
[pre-commit.ci] pre-commit autoupdate ( #8547 )
...
* [pre-commit.ci] pre-commit autoupdate
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2021-04-14 12:49:09 +03:00
dependabot[bot]
22a17dba4e
Bump pytest-django from 4.1.0 to 4.2.0 in /testing/plugins_integration
...
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django ) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases )
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst )
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.1.0...v4.2.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 03:01:33 +00:00
dependabot[bot]
e14bd4a480
Bump django from 3.1.8 to 3.2 in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 3.1.8 to 3.2.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/3.1.8...3.2 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-12 03:01:30 +00:00
dependabot[bot]
207c07285f
Bump django from 3.1.7 to 3.1.8 in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 3.1.7 to 3.1.8.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/3.1.7...3.1.8 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-04-08 20:05:44 +00:00
Ronny Pfannschmidt
41a90cd9fe
Merge pull request #8463 from RonnyPfannschmidt/workaround-8361
...
address #8361 - introduce hook caller wrappers that enable backward compat
2021-04-05 22:50:31 +02:00
Tadeu Manoel
b706a2c048
Fix error with --import-mode=importlib and modules containing dataclasses or pickle ( #7870 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Fixes #7856 , fixes #7859
2021-04-05 17:10:03 -03:00
Ran Benita
c49100cef8
tmpdir: prevent using a non-private root temp directory
...
pytest uses a root temp directory named `/tmp/pytest-of-<username>`. The
name is predictable, and the directory might already exists from a
previous run, so that's allowed.
This makes it possible for my_user to pre-create
`/tmp/pytest-of-another_user`, thus giving my_user control of
another_user's tempdir.
Prevent this scenario by adding a couple of safety checks. I believe
they are sufficient.
Testing the first check requires changing the owner, which requires
root permissions, so can't be unit-tested easily, but I checked it
manually.
2021-04-03 23:42:53 +03:00
Ran Benita
1278f8b97e
tmpdir: fix temporary directories created with world-readable permissions
...
(Written for a Unix system, but might be applicable to Windows as well).
pytest creates a root temporary directory under /tmp, named
`pytest-of-<username>`, and creates tmp_path's and other under it.
/tmp is shared between all users of the system.
This root temporary directory was created with 0o777&~umask permissions,
which usually becomes 0o755, meaning any user in the system could list
and read the files, which is undesirable.
Use 0o700 permissions instead. Also for subdirectories, because the root
dir is adjustable.
2021-04-03 23:42:53 +03:00
Ronny Pfannschmidt
aa10bff750
fix deprecation test for path/fspath hook args
2021-04-03 14:51:36 +02:00
Ronny Pfannschmidt
deb5b5bd96
fix #8371 : fix stack-level
2021-04-02 00:58:05 +02:00
Bruno Oliveira
c1bdff9e69
Merge pull request #8494 from nicoddemus/python-3.10
2021-03-27 11:32:31 -03:00
Bruno Oliveira
b2954e85d6
Adjust message for Python 3.10
...
Now the message includes the class name ("Skip.__init__() got multiple...").
2021-03-27 11:13:16 -03:00
Bruno Oliveira
d9f4cedf17
Merge pull request #8472 from bluetech/rm-unnecessary-py-path-4
...
testing: stop relying on comparing to py.path in fnmatcher tests
2021-03-26 07:43:37 -03:00
Bruno Oliveira
be8d63e33b
Increase truncation threshold with -v, disable with -vv
...
Fix #6682
Fix #8403
2021-03-26 07:05:30 -03:00
Florian Bruhin
bc055e8e69
Fix required_plugins with prereleases ( #8469 )
...
* Fix required_plugins with prereleases
Fixes #8456
* Fix existing tests
* Update changelog/8456.bugfix.rst
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-03-21 22:51:12 +01:00
Ronny Pfannschmidt
7ac7610089
add tresting for implication
2021-03-20 23:44:36 +01:00
Ronny Pfannschmidt
4ddf6c647c
test warnings and fix invocation bugs
2021-03-20 23:39:38 +01:00
Ran Benita
945cc0b5a1
testing: stop relying on comparing to py.path in fnmatcher tests
2021-03-20 21:58:45 +02:00
Ran Benita
4690e4c510
reports: support any PathLike instead of only Path, py.path
...
The goal is to avoid referring to the legacy py.path.
2021-03-18 10:23:48 +02:00
Ran Benita
e515264eb1
Remove yet more unnecessary py.path uses
2021-03-18 10:23:48 +02:00
Ran Benita
fe215bda6b
Merge pull request #8446 from bluetech/unnecessary-py-path-2
...
More py.path removal work
2021-03-18 10:20:59 +02:00
Kale Kundert
dd3709718d
Merge pull request #8453 from encukou/rel-error-message
...
Fix value in error message about negative relative tolerance
2021-03-16 16:43:31 -04:00
pre-commit-ci[bot]
da4abd1c82
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-03-16 19:10:55 +00:00
Petr Viktorin
43b451e95e
Add tests for the error message
2021-03-16 20:09:17 +01:00
Ran Benita
f0c7043138
Remove/replace some more unnecessary uses of py.path
2021-03-15 10:39:44 +02:00
Ran Benita
a03ee02817
config: make `collect_ignore` accept any PathLike
...
The main reason is to remove a reference to `py.path`.
2021-03-15 10:39:32 +02:00
Ran Benita
b26d1bb18f
cacheprovider: add cache.mkdir() as a Path-returning replacement to makedir()
...
It is not possible to change a return type in a compatible way, so a new
method is added.
2021-03-15 10:39:31 +02:00
Ran Benita
59251e8a2a
Remove/replace some unneeded usages of py.path
2021-03-14 14:12:28 +02:00
Ran Benita
db539ed2b0
Merge pull request #8437 from bluetech/rm-typevar-prefix
...
Remove `_` prefix from TypeVars, expose ExceptionInfo
2021-03-13 19:01:29 +02:00