Either unschedule all requested tests, or none if it's not possible -
if some of the requested tests have already been processed by the time
the request arrives. It may happen if the worker runs tests faster than
the controller receives and processes status updates. But in this case
maybe it's just better to let the worker keep running.
This is a prerequisite for group/scope support in worksteal scheduler -
so they won't be broken up incorrectly.
This change could break schedulers that use "steal" command. However:
1) worksteal scheduler doesn't need any adjustments.
2) I'm not aware of any external schedulers relying on this command yet.
So I think it's better to keep the protocol simple, not complicate it for
imaginary compatibility with some unknown and likely non-existent
schedulers.
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Use the execnet main_thread_only execmodel so that code which expects
to run in the main thread will just work. This execmodel has been
merged to the execnet master branch via pytest-dev/execnet#243, so this
patch should not be merged until there is a released version of execnet
supporting the main_thread_only execmodel.
Closes#620
Otherwise we would get this error:
```
error: Function "Callable[[Any, bool, Optional[float]], None]" could always be true in boolean context [truthy-function]
```
- 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.
This gets used e.g. by argparse for the "prog" part.
We could explicitly pass it through and/or set it on
config._parser.prog, but that is a bit tedious just for this use case,
and it looks like "simulating" the main prog here appears to not be that
bad of a hack after all.
Make sure a plain "tox" command works in all platforms without failures,
which facilitates making releases using a "devpi upload/test" workflow
* Fix small flakes failures
* Limit py35 testing to pytest>=2.7, as pytest<2.7 does not work on py35
* pexpect environments only work on Linux platforms and should be skipped on Windows
* Simplify AppVeyor script by running all tox environments: no need to have a build matrix
because AppVeyor does not execute builds in parallel
* Add all environments to travis.yml, obtained from "tox --listenvs"
and improve heuristics for sending chunks where the chunksize
depends on the number of remaining tests rather than fixed numbers.
This reduces the number of master -> node messages (but not the
reverse direction)