Ran Benita
2bac85562b
Merge pull request #728 from bluetech/hookimpl-decorators
...
Add explicit pytest.hookspec/hookimpl annotations, avoid legacy tryfirst/trylast marks
2021-11-02 12:28:36 +02:00
Ran Benita
b85b71cd22
Add explicit pytest.hookspec/hookimpl annotations, avoid legacy tryfirst/trylast marks
2021-11-02 09:42:00 +02:00
Ran Benita
89a3df3e20
Deprecate --boxed
...
This will allow removing the pytest-forked dependency in the future.
Refs #468 .
2021-11-02 09:38:56 +02:00
Ran Benita
ae58690f3e
Avoid soft-deprecated pathlist ini type on pytest>=7
...
This allows the test suite to succeed with the legacypath plugin
blocked.
Fix #722 .
2021-11-01 09:06:32 +02:00
Ran Benita
d794b27e72
Use config._tmp_path_factory instead of config._tmpdirhandler
...
Both are private, and shouldn't be used, but not sure how to fix it
currently. But `_tmpdirhandler` will be relegated to the legacypath
plugin so should extra not be used.
2021-11-01 09:06:32 +02:00
Ran Benita
787b8d9c14
Add basic mypy linting
...
Based on pytest setup, though more lax. Currently only the tests are
annotated so only helpful for them.
Fix #721 .
2021-11-01 09:06:32 +02:00
Ran Benita
9ddb274f23
Update test suite to modern pytest
...
- Use pytest>=6.2 features (same as install_requires).
When we can require >=7, can fix some more typing omissions and
version checks.
- Replace testdir with pytester
- Replace py.test with pytest
- Replace tmpdir with tmp_path
- Remove (almost) all other uses of py
- Add some type annotations (not checked yet)
Ref #722 .
2021-11-01 09:05:28 +02:00
Bruno Oliveira
c7c7f9ef5b
Use modern options configurations for hooks
...
Noticed while reviewing https://github.com/pytest-dev/pytest/pull/9118
2021-09-24 10:09:24 -03:00
David Lamparter
766e67ce52
Use setproctitle if available to show state ( #696 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2021-09-03 12:58:01 -03:00
Ronny Pfannschmidt
b02a6db771
Merge pull request #667 from graingert/fix-sys-path
...
fix sys.path for local workers Fixes #421
2021-06-16 11:40:55 +02:00
Ronny Pfannschmidt
7f07d50808
Merge pull request #646 from kroeschl/numprocesses-logical
...
Add explicit 'logical' choice to --numprocesses flag
2021-06-08 08:44:29 +02:00
Thomas Grainger
56e631b4bb
fix sys.path for local workers Fixes #421
2021-06-03 21:20:11 +01:00
pre-commit-ci[bot]
0c84201b40
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-05-31 19:13:26 +00:00
Bruno Oliveira
d4d01bba2e
Apply suggestions from code review
2021-04-27 11:51:04 -03:00
Kyle Roeschley
4d27110beb
Add 'logical' CPU count choice for --numprocesses
...
This can significantly speed up runs when testing is not CPU-bound.
2021-04-27 08:47:21 -05:00
pre-commit-ci[bot]
260211603e
[pre-commit.ci] pre-commit autoupdate ( #655 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-04-27 09:30:37 -03:00
xoviat
f861f1667d
add new pytest_handlecrashitem hook
...
allows handling and rescheduling crash tests
PR #651
Co-authored-by: xoviat <xoviat@users.noreply.github.com >
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2021-04-27 09:07:49 -03:00
Adam Johnson
f02aa70c95
Upgrade pre-commit hooks
...
Use `pre-commit autoupdate` to upgrade, and follow the message from `pre-commit-hooks` to move to the official `flake8` hook.
2021-03-20 11:13:59 -03:00
Ronny Pfannschmidt
1189ae4b91
Merge pull request #624 from pytest-dev/fix-592-use-controller
...
prepare #592 : replace master with controller where we can
2021-02-11 12:27:08 +01:00
Ronny Pfannschmidt
9e4e8b74e0
Apply suggestions from code review
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2021-02-09 21:51:30 +01:00
Ronny Pfannschmidt
166bdb4103
prepare #592 : replace master with controller where we can
2021-02-07 22:08:22 +01:00
Ronny Pfannschmidt
aa89c42ad7
prepare for Node.fspath deprecation
...
calculate topdir based on config.rootpath/rootdir
addresses pytest-dev/pytest#8251
2021-02-07 20:44:31 +01:00
Bruno Oliveira
16d636391b
Propagate internal errors to the master node
...
This should help users diagnose internal errors in workers like
exceptions from hooks or in pytest itself.
2020-12-13 20:05:31 -03:00
Bruno Oliveira
607d8288d4
Add psutil extra and introduce pytest_xdist_auto_num_workers hook
...
This makes using psutil optional and opens up the possibility of customization
through the pytest_xdist_auto_num_workers hook, making things like #477 possible.
Fix #585
2020-08-25 08:38:28 -03:00
Bruno Oliveira
e469fc7b80
Revert "Merge pull request #560 from utapyngo/logical-cpu-count"
...
This reverts commit 0094b29a14 , reversing
changes made to c6255faad4 .
2020-08-24 14:50:36 -03:00
Christine M
c211d247a7
Noisy rsync ( #473 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2020-08-12 17:23:03 -03:00
Zac-HD
d153e0a4c4
Remove compat for pytest < 6
2020-08-06 15:48:33 +10:00
Sylvain Marié
ba8398478e
New methods is_xdist_worker, is_xdist_master, get_xdist_worker_id. ( #505 )
...
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com >
Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com >
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2020-08-05 20:41:54 -03:00
Bruno Oliveira
047816f33a
Drop features from old pytest versions
2020-08-05 19:55:56 -03:00
Hugo
dddac7c7e9
Remove six library
2020-08-03 22:52:18 +10:00
Hugo
22ae7ff7af
Upgrade Python syntax with pyupgrade --py3-plus
2020-08-03 22:52:03 +10:00
Hugo
6f315356be
Set py35 as target version for Black
2020-08-03 22:52:03 +10:00
Zac-HD
de3e54fd27
Finish removal of "slave" terminology
...
See issue #234 . It's time.
2020-08-03 22:51:42 +10:00
Zac Hatfield-Dodds
0094b29a14
Merge pull request #560 from utapyngo/logical-cpu-count
2020-08-03 22:49:09 +10:00
Ivan Zaikin
e528a42ddc
Support OpenBSD and NetBSD
2020-07-28 08:55:32 +07:00
Adam Johnson
b524317863
Make "--pdb" imply "--dist no"
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2020-07-24 20:07:42 -03:00
Bruno Oliveira
18b18870a8
Do not trigger pytest_warning_captured in pytest 6.0+
...
Fix #562
2020-07-24 15:19:07 -03:00
Ivan Zaikin
77e5fdfef9
Use psutil.cpu_count(logical=False) in auto_detect_cpus()
2020-07-23 10:18:43 +07:00
Bruno Oliveira
443dc21061
Fix rsyncdirs usage with pytest 6.0
...
Fix pytest-dev/pytest#7487
2020-07-13 12:09:02 -03:00
Bruno Oliveira
b25757199c
Support new `pytest_warning_recorded` hook from pytest 6.0
2020-07-08 17:51:45 -03:00
Lukas Geiger
311cbfabfb
Prefer list comprehensions over list.append()
2020-06-21 01:00:02 +02:00
Sven-Hendrik Haase
2183d741bb
Add global session uuid ( fixes #524 )
2020-04-30 19:43:16 +02:00
Hugo van Kemenade
3a470043c9
Merge branch 'master' into rm-3.4
2020-01-26 21:05:51 +02:00
Ionel Cristian Mărieș
038a59eebc
Fix regression with custom arguments being dropped in non-local… ( #491 )
...
* No idea what I'm doing.
* Extend integration test to cover ac3f6a78c7401aba9b62c2c67f280a129ae84eaf.
* Remove useless output to stop failing other tests.
* Reformat.
* Upgrade virtualenv to see if it fixes py34 builds
* Add CHANGELOG entry
* Make foobarplugin part of the test only
* Fix language_version in pre-commit for rst
* Fix test in Python 2
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2019-12-19 21:00:02 -03:00
Hugo
157871c026
Upgrade Python syntax with pyupgrade
2019-12-02 17:57:38 +02:00
Tom Boshoven
8cbbbe1a2a
Add another no:terminal fix and add a test.
2019-09-12 10:32:20 -04:00
Tom Boshoven
32a29138fc
Fix issues related to running xdist with the terminal plugin disabled
...
This fixes an issue where the pytest plugin manager returns None if a plugin is not loaded instead of raising an error.
It also makes terminal optional in plugin code.
2019-09-11 19:47:16 -04:00
Bruno Oliveira
9f9b707481
Remove pytest 2.8 compatibility code ( #451 )
...
Remove pytest 2.8 compatibility code
2019-07-11 08:11:37 -03:00
Bruno Oliveira
2ca058e38a
Remove pytest 2.8 compatibility code
2019-07-11 07:46:53 -03:00
Bruno Oliveira
953a3f0b4d
Use Config.invocation_params for consistent worker initialization
...
Decided to keep the old way still working for now.
Fix #6
Fix #445
2019-07-10 19:59:12 -03:00