Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: pytest-dev/pytest
Choose a Base Repository
pytest-dev/pytest
3h4x/pytest
Bachmann1234/pytest
Bjwebb/pytest
Carreau/pytest
CoolCloud/pytest
Elizaveta239/pytest
FirePing32/pytest
Haibo-Wang-ORG/pytest
JaakkoTulkki/pytest
Jacklibobo/pytest
JanAdamiak/pytest
JosiasAurel/pytest
KangarooCreativeTeam/pytest
LaserPhaser/pytest
LeeKamentsky/pytest
MengJueM/pytest
MichaelAquilina/pytest
NEWMANHA/pytest
NeronNeron/pytest
RedBeardCode/pytest
RonnyPfannschmidt/pytest
Sup3rGeo/pytest
Toilal/pytest
WoLpH/pytest
ZGluz/pytest
Zac-HD/pytest
Zearin/pytest
abusalimov/pytest
aivizionz/pytest
alertisme/pytest
alex/pytest
allankilpatrick/pytest
amfarrell/pytest
amueller/pytest
anntzer/pytest
appneta/pytest
asdlele/pytest
aselus-hub/pytest
asottile/pytest
asvetlov/pytest
axil/pytest
azenk/pytest
b-jazz/pytest
bbs598598/pytest
benauthor/pytest
biern/pytest
blubber/pytest
blueyed/pytest
bubenkoff/pytest
bukzor/pytest
caot/pytest
chaosgeek/pytest
chiller/pytest
chmeldax/pytest
codewarrior0/pytest
cpommranz/pytest
curzona/pytest
davehunt/pytest
davidszotten/pytest
dbzm/pytest
demianbrecht/pytest
diegorusso/pytest
dmerejkowsky/pytest
doomb0t/pytest
ducs-personal/pytest
eli-b/pytest
embray/pytest
enkoder/pytest
eolo999/pytest
esiegerman/pytest
fbessho/pytest
fengxx/pytest
flub/pytest
fudp/pytest
gabrielcnr/pytest
gdyuldin/pytest
gnprice/pytest
goodboy/pytest
gprasad84/pytest
graingert/pytest
grigouze/pytest
gsnedders/pytest
guyzmo/pytest
hackebrot/pytest
happyspace/pytest
hartym/pytest
helenst/pytest
hpk42/pytest
hunse/pytest
iCodeIN/pytest
inirudebwoy/pytest
intermezzo-fr/pytest
ioggstream/pytest
ionelmc/pytest
irachex/pytest
jab/pytest
javiromero/pytest
jb098/pytest
jeanconn/pytest
jenisys/pytest
jessingrass/pytest
jgehrcke/pytest
jjanczyszyn/pytest
joguSD/pytest
jonathanburns/pytest
jugmac00/pytest
k4rtik/pytest
kalekundert/pytest
kevincox/pytest
kracekumar/pytest
lavacat/pytest
lijie1005/pytest
liuweihere/pytest
lukmdo/pytest
luzfcb/pytest
m3talstorm/pytest
macrotim/pytest
malinoff/pytest
manuphatak/pytest
marscher/pytest
matthewshim/pytest
matthiasha/pytest
mbachry/pytest
mbirtwell/pytest
mbyt/pytest
mdaffern/pytest
mdboom/pytest
mehdy/pytest
mgedmin/pytest
mgeier/pytest
mhils/pytest
moagstar/pytest
mouseratti/pytest
mpasseri/pytest
msrb/pytest
mvoitko/pytest
naveenkumar-grofers/pytest
nayyarv/pytest
nchammas/pytest
netme/pytest
nicoddemus/pytest
nirs/pytest
novas0x2a/pytest
offbyone/pytest
ojake/pytest
okken/pytest
oleg-alexandrov/pytest
olegpidsadnyi/pytest
oybin1989/pytest
pakal/pytest
pauloxnet/pytest
pelme/pytest
prusse-martin/pytest
quodlibetor/pytest
raquel-ucl/pytest
refi64/pytest
rmfitzpatrick/pytest
roolebo/pytest
rygwdn/pytest
s0undt3ch/pytest
sam-m888/pytest
saxix/pytest
schipiga/pytest
sdementen/pytest
shoaib-s/pytest
shoyer/pytest
sidhuiklaq/pytest
simudream/pytest
skylarjhdownes/pytest
srinivasreddy/pytest
suzaku/pytest
takluyver/pytest
tamasgal/pytest
tareqalayan/pytest
tbekolay/pytest
thedrow/pytest
timnon/pytest
ting81/pytest
tomviner/pytest
txomon/pytest
uSpike/pytest
ulope/pytest
untitaker/pytest
userzimmermann/pytest
victorliun/pytest
vladimirlagunov/pytest
vodik/pytest
vovanbo/pytest
vpyvovarov/pytest
wanam/pytest
wfxiang08/pytest
xavfernandez/pytest
xianglove/pytest
xtryaii/pytest
yoloseem/pytest
yzdx0000/pytest
zancas/pytest
zhangjuncare/pytest
zhuyafang-hn/pytest
Nothing to show
base: 5.4.3
head repository: pytest-dev/pytest
Choose a Head Repository
pytest-dev/pytest
3h4x/pytest
Bachmann1234/pytest
Bjwebb/pytest
Carreau/pytest
CoolCloud/pytest
Elizaveta239/pytest
FirePing32/pytest
Haibo-Wang-ORG/pytest
JaakkoTulkki/pytest
Jacklibobo/pytest
JanAdamiak/pytest
JosiasAurel/pytest
KangarooCreativeTeam/pytest
LaserPhaser/pytest
LeeKamentsky/pytest
MengJueM/pytest
MichaelAquilina/pytest
NEWMANHA/pytest
NeronNeron/pytest
RedBeardCode/pytest
RonnyPfannschmidt/pytest
Sup3rGeo/pytest
Toilal/pytest
WoLpH/pytest
ZGluz/pytest
Zac-HD/pytest
Zearin/pytest
abusalimov/pytest
aivizionz/pytest
alertisme/pytest
alex/pytest
allankilpatrick/pytest
amfarrell/pytest
amueller/pytest
anntzer/pytest
appneta/pytest
asdlele/pytest
aselus-hub/pytest
asottile/pytest
asvetlov/pytest
axil/pytest
azenk/pytest
b-jazz/pytest
bbs598598/pytest
benauthor/pytest
biern/pytest
blubber/pytest
blueyed/pytest
bubenkoff/pytest
bukzor/pytest
caot/pytest
chaosgeek/pytest
chiller/pytest
chmeldax/pytest
codewarrior0/pytest
cpommranz/pytest
curzona/pytest
davehunt/pytest
davidszotten/pytest
dbzm/pytest
demianbrecht/pytest
diegorusso/pytest
dmerejkowsky/pytest
doomb0t/pytest
ducs-personal/pytest
eli-b/pytest
embray/pytest
enkoder/pytest
eolo999/pytest
esiegerman/pytest
fbessho/pytest
fengxx/pytest
flub/pytest
fudp/pytest
gabrielcnr/pytest
gdyuldin/pytest
gnprice/pytest
goodboy/pytest
gprasad84/pytest
graingert/pytest
grigouze/pytest
gsnedders/pytest
guyzmo/pytest
hackebrot/pytest
happyspace/pytest
hartym/pytest
helenst/pytest
hpk42/pytest
hunse/pytest
iCodeIN/pytest
inirudebwoy/pytest
intermezzo-fr/pytest
ioggstream/pytest
ionelmc/pytest
irachex/pytest
jab/pytest
javiromero/pytest
jb098/pytest
jeanconn/pytest
jenisys/pytest
jessingrass/pytest
jgehrcke/pytest
jjanczyszyn/pytest
joguSD/pytest
jonathanburns/pytest
jugmac00/pytest
k4rtik/pytest
kalekundert/pytest
kevincox/pytest
kracekumar/pytest
lavacat/pytest
lijie1005/pytest
liuweihere/pytest
lukmdo/pytest
luzfcb/pytest
m3talstorm/pytest
macrotim/pytest
malinoff/pytest
manuphatak/pytest
marscher/pytest
matthewshim/pytest
matthiasha/pytest
mbachry/pytest
mbirtwell/pytest
mbyt/pytest
mdaffern/pytest
mdboom/pytest
mehdy/pytest
mgedmin/pytest
mgeier/pytest
mhils/pytest
moagstar/pytest
mouseratti/pytest
mpasseri/pytest
msrb/pytest
mvoitko/pytest
naveenkumar-grofers/pytest
nayyarv/pytest
nchammas/pytest
netme/pytest
nicoddemus/pytest
nirs/pytest
novas0x2a/pytest
offbyone/pytest
ojake/pytest
okken/pytest
oleg-alexandrov/pytest
olegpidsadnyi/pytest
oybin1989/pytest
pakal/pytest
pauloxnet/pytest
pelme/pytest
prusse-martin/pytest
quodlibetor/pytest
raquel-ucl/pytest
refi64/pytest
rmfitzpatrick/pytest
roolebo/pytest
rygwdn/pytest
s0undt3ch/pytest
sam-m888/pytest
saxix/pytest
schipiga/pytest
sdementen/pytest
shoaib-s/pytest
shoyer/pytest
sidhuiklaq/pytest
simudream/pytest
skylarjhdownes/pytest
srinivasreddy/pytest
suzaku/pytest
takluyver/pytest
tamasgal/pytest
tareqalayan/pytest
tbekolay/pytest
thedrow/pytest
timnon/pytest
ting81/pytest
tomviner/pytest
txomon/pytest
uSpike/pytest
ulope/pytest
untitaker/pytest
userzimmermann/pytest
victorliun/pytest
vladimirlagunov/pytest
vodik/pytest
vovanbo/pytest
vpyvovarov/pytest
wanam/pytest
wfxiang08/pytest
xavfernandez/pytest
xianglove/pytest
xtryaii/pytest
yoloseem/pytest
yzdx0000/pytest
zancas/pytest
zhangjuncare/pytest
zhuyafang-hn/pytest
Nothing to show
compare: 6.0.0
This comparison is big! We’re only showing the most recent 250 commits
Commits on Jun 05, 2020
This option checks even functions which are not annotated. It's a good
step to ensure that existing type annotation are correct.

In a Pareto fashion, the last few holdouts are always the ugliest,
beware.
Add more type annotations
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This is rejected by Python DEBUG builds, as well as regular builds in
future versions.
Commits on Jun 06, 2020
mark/expression: prevent creation of illegal Python identifiers
…#6825)

Co-authored-by: Ran Benita <ran@unusedvar.com>
Commits on Jun 07, 2020
Commits on Jun 08, 2020
…ixes #5965 (#6523)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Commits on Jun 09, 2020
* Introduce guidelines for closing stale issues/PRs

Close #7282

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
Co-authored-by: Anthony Sottile <asottile@umich.edu>
Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Ruaridh Williamson <ruaridh.williamson@flexciton.com>
Remove start_doc_server.sh script
Add documentation on closing issues
cache the pre-commit environment
Commits on Jun 10, 2020
doc: Explain indirect parametrization and markers for fixtures
Commits on Jun 11, 2020
Co-authored-by: Ran Benita <ran@unusedvar.com>
Commits on Jun 12, 2020
Suppress errors while removing tmpdir's lock files
Finish deprecation of "slave"
Not needed since update from mypy 0.770 -> 0.780.
Also switch to using ExceptionRepr instead of
`Union[ReprExceptionInfo, ExceptionChainRepr]`
which is somewhat annoying and less future proof.
These errors are found using a typed version of py.path.local.
Fixes:

src/_pytest/config/__init__.py:1071: error: Argument 1 to "Version" has incompatible type "Union[str, List[str]]"; expected "str"  [arg-type]
Commits on Jun 13, 2020
More type annotations, fix some typing bugs
Fix #5821

Co-authored-by: Ran Benita <ran@unusedvar.com>
This is just to satisfy typing coverage.
Commits on Jun 14, 2020
While working on improving the documentation of the
`pytest_runtest_setup` hook, I came up with this text:

> Called to perform the setup phase of the test item.
>
> The default implementation runs ``setup()`` on item and all of its
> parents (which haven't been setup yet). This includes obtaining the
> values of fixtures required by the item (which haven't been obtained
> yet).

But upon closer inspection I noticed this line at the start of
`SetupState.prepare` (which is what does the actual work for
`pytest_runtest_setup`):

    self._teardown_towards(needed_collectors)

which implies that the setup phase of one item might trigger teardowns
of *previous* items. This complicates the simple explanation. It also
seems like a completely undesirable thing to do, because it breaks
isolation between tests -- e.g. a failed teardown of one item shouldn't
cause the failure of some other items just because it happens to run
after it.

So the first thing I tried was to remove that line and see if anything
breaks -- nothing did. At least pytest's own test suite runs fine. So
maybe it's just dead code?
…test names

This way e.g. a :py:func:`pytest.exit` cross-reference works properly.
CollectReport appears in several hooks, so we should document it. It's
runtest equivalent TestReport is already documented.
Collection occurs before test running, so it seems more logical.
Fix exception causes in config/__init__.py
Commits on Jun 15, 2020
runner: don't try to teardown previous items from pytest_runtest_setup
Require py>=1.8.2 so we can rely on correct hash() of py.path.local n Windows
Allow users to provide version information to the required_plugins INI key
Docs: Update tense, the final Python 2.7 was released in April
assertoutcomes() only accepts plural forms
Commits on Jun 16, 2020
Some type annotations, doc improvements
Commits on Jun 17, 2020
fix changelog file name for issue 4049 fix
Commits on Jun 18, 2020
Commits on Jun 19, 2020
`@pytest.mark.xfail` is meant to work with arbitrary items, and there is
a test `test_mark_xfail_item` which verifies this.

However, the code for some reason uses `pytest_pyfunc_call` for the
call phase check, which only works for Function items. The test
mentioned above only passed "accidentally" because the
`pytest_runtest_makereport` hook also runs a `evalxfail.istrue()` which
triggers and evaluation, but conceptually it shouldn't do that.

Change to `pytest_runtest_call` to make the xfail checking properly
generic.
…ipping

This type was actually in `_pytest.skipping` previously, but was moved to
`_pytest.mark.evaluate` in cf40c07.

I think the previous location was more appropriate, because the
`MarkEvaluator` is not a generic mark facility, it is explicitly and
exclusively used by the `skipif` and `xfail` marks to evaluate their
particular set of arguments. So it is better to put it in the plugin
code.

Putting `skipping` related functionality into the core `_pytest.mark`
module also causes some import cycles which we can avoid.
Commits on Jun 20, 2020
Previously, skipif/xfail marks were evaluated using a `MarkEvaluator`
class. I found this class very difficult to understand.

Instead of `MarkEvaluator`, rewrite using straight functions which are
hopefully easier to follow.

I tried to keep the semantics exactly as before, except improving a few
error messages.
Commits on Jun 21, 2020
There is no need to do the XPASS check here, pytest_runtest_makereport
already handled that (the current handling there is dead code).

All the hook needs to do is refresh the xfail evaluation if needed, and
check the NOTRUN condition again.
Suggested by Bruno.
Type annotate pytest.mark.{skip,skipif,xfail,parametrize,usefixtures,filterwarnings}
skipping: refactor mark evaluation
Fix exception causes all over the codebase
Commits on Jun 22, 2020
…orator

This mistake was introduced in 7259c45.
Commits on Jun 23, 2020
nodes: fix string possibly stored in Node.keywords instead of MarkDecorator
config: improve typing
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Commits on Jun 24, 2020
Fix typo in examples/markers.rst
The got out of date with the actual ones we use.
CONTRIBUTING: sync changelog types
Commits on Jun 25, 2020
`yield_fixture` is a deprecated alias to `fixture`.
…warns

It returns the return value of the function.
Also improve its documentation.
It's been unused for 10 years at lest from bb50ec8.
Commits on Jun 26, 2020
Add webinar to open trainings
Co-authored-by: Ran Benita <ran@unusedvar.com>
Fix-6906: Added code-highlight option to disable highlighting optionally
Commits on Jun 27, 2020
More typing work
Close #7389
Commits on Jun 28, 2020
Reduce calls to item.ihook
Refactor src/_pytest/config/__init__.py to use the warnings module instead of stderr for warnings
Commits on Jun 30, 2020
Just the nodeid is enough for the error messages.
This removes an import cycle.
A trylast is more appropriate for this usecase.

hookwrappers are more complicated and more expensive than regular
hookimpls, so better avoided.
This has been asserted like this since 04e9197
(i.e. 11 years, pytest 1.0), seems safe to simply remove at this point.
Commits on Jul 01, 2020
Setting log_level via the CLI or .ini will control the log level of the
report that is dumped upon failure of a test.

If caplog modified the log level during the execution of that test, it
should not impact the level that is displayed upon failure in the
"captured log report" section.

[
ran:
- rebased
- reused handler
- changed store keys also to "caplog_handler_*"
- added changelog
all bugs are mine :)
]
Probably was done to avoid the shadowing issue, but work around it
instead.
This has been there since as far as the git history goes (2007), is not
covered by any test, and says "Buggy python version consider upgrading".
Hopefully everyone have upgraded...
inspect.getsource() definitely returns str.
Cross-type comparisons like this are a bad idea. This isn't used.
eval() is used for evaluating string conditions in skipif/xfail e.g.

    @pytest.mark.skipif("1 == 0")

This is the only code that uses `_pytest._code.compile()`, so removing
its last use enables us to remove it entirely.

In this case it doesn't add much. Plain compile() gives a good enough
error message.

For regular exceptions, the message is the same.

For SyntaxError exceptions, e.g. "1 ==", the previous code adds a little
bit of useful context:

```
invalid syntax (skipping.py:108>, line 1)

The above exception was the direct cause of the following exception:
1 ==
     ^
(code was compiled probably from here: <0-codegen /pytest/src/_pytest/skipping.py:108>) (line 1)

During handling of the above exception, another exception occurred:
Error evaluating 'skipif' condition
    1 ==
         ^
SyntaxError: invalid syntax
```

The new code loses it:

```
unexpected EOF while parsing (<skipif condition>, line 1)

During handling of the above exception, another exception occurred:
Error evaluating 'skipif' condition
    1 ==
        ^
SyntaxError: invalid syntax
```

Since the old message is a minor improvement to an unlikely error
condition in a deprecated feature, I think it is not worth all the code
that it requires.
A lot of complex code that isn't used anymore outside of tests after
the previous commit.
The recursive way in which Source and getsource interact is a bit
confusing, just inline it.
They sometime leak into other test's warnings and cause them to fail.
logging: use unique handlers for caplog and reports
Commits on Jul 03, 2020
fix mypy issue by using typing Match instead of re.Match
Commits on Jul 04, 2020
python: a few cleanups
testing: fix flaky tests due to "coroutine never awaited" warnings
pytester: slightly clean up LsofFdLeakChecker
code/source: some cleanups
Commits on Jul 05, 2020
Publish our types
Commits on Jul 06, 2020
Unfortunately couldn't figure out how to fix the generated link, so at least
for now remove it to avoid confusion.

Fix #7331
Commits on Jul 07, 2020
Now that our master might contain new features, it is best to point
users to the stable docs rather than the latest
Commits on Jul 08, 2020
Co-authored-by: Vlad <uladzislau.radziuk@nordcloud.com>
Commits on Jul 09, 2020
Co-authored-by: Arvin Firouzi <427014@student.fontys.nl>
Commits on Jul 10, 2020
Also cleaned up the parametrized list using `pytest.param` to assign ids
and removed some redundant cases.

Follow up to #7459
Make test_missing_required_plugins xdist-independent
It does the same as a simple isinstance check, but adds a little layer
of obscurity on top, which the type checker can't penetrate.
We don't really want `Node` itself as a public API, only its two
subclasses.
Not needed since pyflakes 2.2.0.
Really odd one, let's just inline it.
This implementation is the default when __eq__ is implemented.
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This introduces a new role, `:globalvar:`, so we can mark/reference
variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful
also makes the documentation look more consistent.
mark/structure: fix pylint complaining that builtin marks are not callable
Commits on Jul 11, 2020
Remove package scope experimental status
Some minor fixes & type annotations
#7468)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
- Grammar fixes
- Moved a few sections from Features to Improvements
- Used internal doc links when appropriate
terminalwriter: bring back handling of printing characters not supported by stdout
Commits on Jul 13, 2020
Small fixes/updates to the 6.0.0rc1 CHANGELOG
If a test runtest phase (not setup) dynamically adds a pytest.mark.xfail
mark to the item, it should be respected, but it wasn't. This regressed
in 3e6fe92 (not released).

Fix it by just always refreshing the mark if needed. This is mostly what
was done before but in a more roundabout way.
mark: fix typing for `@pytest.mark.xfail(raises=...)`
Commits on Jul 14, 2020
We probably something a bit more elaborate in the future but for now
it's something to verify fixes and catch regressions.
The previous typing had an object passed to the user, which they can't
do anything with without asserting, which is inconvenient. Change it to
Any instead.

Note that what comes *back* to pytest (the return value) should be an
`object`, because we want to handle arbitrary objects without assuming
anything about them.
Commits on Jul 15, 2020
 skipping: fix dynamic xfail mark added in runtest not respected
 Fix typing of params ids callable form
Fix #7500

Co-authored-by: Ran Benita <ran@unusedvar.com>
Clarify 'getfixture' needs to access fixtures by normal means
Commits on Jul 17, 2020
Previously was restricted to >=1.8.2,<2.1, but newer versions have some
nice improvements I'd like to be able to use in upcoming changes.

Changelog: https://www.sphinx-doc.org/en/master/changes.html#release-3-1-0-released-jun-08-2020

There are two issues that came up:

1. `highlightlang` is deprecated for `highlight`.

2. Doesn't like having two `automethod` generated for the same
   `Metafunc.parametrize` method. Gives this warning:

   `pytest/doc/en/reference.rst:846: WARNING: duplicate object description of _pytest.python.Metafunc.parametrize, other instance in reference, use :noindex: for one of them`

   To work around this I make `pytest.mark.parametrize` link to
   `Metafunc.parametrize` instead of repeating it.
Commits on Jul 18, 2020
docs: support Sphinx>=3.1 and require it
Commits on Jul 19, 2020
Commits on Jul 20, 2020
docs: Add a note about -q option used in getting started guide
Fix #7514 by augmenting Note with behaviour when parametrized values are mutated
(changes are reflected in subsequent test-case calls).
This fixes CI on Windows since GitHub Actions started installing WSL on
their images which apparently installs some wrapper `bash` which does
not run actual bash.
Fix typo
Change from "A xfail" to "An xfail"
Fix "A xfail" typo
Preserve newlines when captured with capfd
Commits on Jul 21, 2020
Commits on Jul 22, 2020
Fix #7512

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
testing: improve bash check
List pytest_warning_captured in deprecated things for 6.0.0rc1
doc: mention mypy<0.750 doesn't work in typing changelog
Commits on Jul 23, 2020
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Commits on Jul 24, 2020
* Revert change to traceback repr

* Add test and changelog entry

* Restore *exact* prev output

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Commits on Jul 27, 2020
remove usage of pylib in docs
Commits on Jul 28, 2020
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Showing 317 changed files with 13,399 additions and 7,722 deletions.
@@ -7,6 +7,10 @@ Here is a quick checklist that should be present in PRs.
- [ ] Include new tests or update existing tests when applicable.
- [X] Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.
If this change fixes an issue, please:
- [ ] Add text like ``closes #XYZW`` to the PR description and/or commits (where ``XYZW`` is the issue number). See the [github docs](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more information.
Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
- [ ] Create a new changelog file in the `changelog` folder, with a name like `<ISSUE NUMBER>.<TYPE>.rst`. See [changelog/README.rst](https://github.com/pytest-dev/pytest/blob/master/changelog/README.rst) for details.
@@ -1,9 +1,3 @@
# evaluating GitHub actions for CI, disregard failures when evaluating PRs
#
# this is still missing:
# - deploy
# - upload github notes
#
name: main

on:
@@ -39,12 +33,12 @@ jobs:
"ubuntu-py37-pluggy",
"ubuntu-py37-freeze",
"ubuntu-py38",
"ubuntu-py39",
"ubuntu-pypy3",

"macos-py37",
"macos-py38",

"linting",
"docs",
"doctesting",
]
@@ -62,15 +56,15 @@ jobs:
- name: "windows-py37"
python: "3.7"
os: windows-latest
tox_env: "py37-twisted-numpy"
tox_env: "py37-numpy"
- name: "windows-py37-pluggy"
python: "3.7"
os: windows-latest
tox_env: "py37-pluggymaster-xdist"
- name: "windows-py38"
python: "3.8"
os: windows-latest
tox_env: "py38"
tox_env: "py38-unittestextras"
use_coverage: true

- name: "ubuntu-py35"
@@ -84,7 +78,7 @@ jobs:
- name: "ubuntu-py37"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-lsof-numpy-oldattrs-pexpect-twisted"
tox_env: "py37-lsof-numpy-oldattrs-pexpect"
use_coverage: true
- name: "ubuntu-py37-pluggy"
python: "3.7"
@@ -98,6 +92,10 @@ jobs:
python: "3.8"
os: ubuntu-latest
tox_env: "py38-xdist"
- name: "ubuntu-py39"
python: "3.9-dev"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-pypy3"
python: "pypy3"
os: ubuntu-latest
@@ -113,10 +111,6 @@ jobs:
tox_env: "py38-xdist"
use_coverage: true

- name: "linting"
python: "3.7"
os: ubuntu-latest
tox_env: "linting"
- name: "docs"
python: "3.7"
os: ubuntu-latest
@@ -128,9 +122,17 @@ jobs:
use_coverage: true

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
if: matrix.python != '3.9-dev'
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} (deadsnakes)
uses: deadsnakes/action@v1.0.0
if: matrix.python == '3.9-dev'
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
@@ -161,6 +163,20 @@ jobs:
CODECOV_NAME: ${{ matrix.name }}
run: bash scripts/report-coverage.sh -F GHA,${{ runner.os }}

linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: set PY
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pip install tox
- run: tox -e linting

deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest'

@@ -169,9 +185,11 @@ jobs:
needs: [build]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install dependencies
@@ -14,9 +14,12 @@ jobs:
if: (github.event.comment && startsWith(github.event.comment.body, '@pytestbot please')) || (github.event.issue && !github.event.comment && startsWith(github.event.issue.body, '@pytestbot please'))

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
@@ -29,6 +29,7 @@ doc/*/_changelog_towncrier_draft.rst
build/
dist/
*.egg-info
htmlcov/
issue/
env/
.env/
@@ -5,39 +5,45 @@ repos:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/asottile/blacken-docs
rev: v1.0.0
rev: v1.7.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
rev: v3.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml
- id: debug-statements
exclude: _pytest/debugging.py
exclude: _pytest/(debugging|hookspec).py
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
rev: 3.8.2
hooks:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.3.0]
additional_dependencies: [flake8-typing-imports==1.9.0]
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.4.0
rev: v2.3.0
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py3-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v1.18.0
rev: v2.4.4
hooks:
- id: pyupgrade
args: [--py3-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.9.0
hooks:
- id: setup-cfg-fmt
# TODO: when upgrading setup-cfg-fmt this can be removed
args: [--max-py-version=3.9]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.761 # NOTE: keep this in sync with setup.py.
rev: v0.780 # NOTE: keep this in sync with setup.cfg.
hooks:
- id: mypy
files: ^(src/|testing/)
19 AUTHORS
@@ -63,6 +63,7 @@ Christian Tismer
Christoph Buelter
Christopher Dignam
Christopher Gilling
Claire Cecil
Claudio Madotto
CrazyMerlyn
Cyrus Maden
@@ -80,6 +81,7 @@ David Paul Röthlisberger
David Szotten
David Vierra
Daw-Ran Liou
Debi Mishra
Denis Kirisov
Dhiren Serai
Diego Russo
@@ -94,17 +96,21 @@ Elizaveta Shashkova
Endre Galaczi
Eric Hunsberger
Eric Siegerman
Erik Aronesty
Erik M. Bray
Evan Kepner
Fabien Zarifian
Fabio Zadrozny
Felix Nieuwenhuizen
Feng Ma
Florian Bruhin
Florian Dahlitz
Floris Bruynooghe
Gabriel Reis
Gene Wood
George Kussumoto
Georgy Dyuldin
Gleb Nikonorov
Graham Horler
Greg Price
Gregory Lee
@@ -147,7 +153,9 @@ Justyna Janczyszyn
Kale Kundert
Karl O. Pinc
Katarzyna Jachim
Katarzyna Król
Katerina Koukiou
Keri Volans
Kevin Cox
Kevin J. Foley
Kodi B. Arfer
@@ -157,6 +165,7 @@ Kyle Altendorf
Lawrence Mitchell
Lee Kamentsky
Lev Maximov
Lewis Cowles
Llandy Riveron Del Risco
Loic Esteve
Lukas Bednar
@@ -183,6 +192,7 @@ Matt Duck
Matt Williams
Matthias Hafner
Maxim Filipenko
Maximilian Cosmo Sitter
mbyt
Michael Aquilina
Michael Birtwell
@@ -213,15 +223,19 @@ Ondřej Súkup
Oscar Benjamin
Patrick Hayes
Pauli Virtanen
Pavel Karateev
Paweł Adamczak
Pedro Algarvio
Philipp Loose
Pieter Mulder
Piotr Banaszkiewicz
Piotr Helm
Prashant Anand
Pulkit Goyal
Punyashloka Biswal
Quentin Pradet
Ralf Schmitt
Ram Rachum
Ralph Giles
Ran Benita
Raphael Castaneda
@@ -235,6 +249,7 @@ Romain Dorgueil
Roman Bolshakov
Ronny Pfannschmidt
Ross Lawley
Ruaridh Williamson
Russel Winder
Ryan Wooden
Samuel Dion-Girardeau
@@ -245,6 +260,7 @@ Segev Finer
Serhii Mozghovyi
Seth Junot
Simon Gomizelj
Simon Kerr
Skylar Downes
Srinivas Reddy Thatiparthy
Stefan Farmbauer
@@ -254,6 +270,7 @@ Stefano Taschini
Steffen Allner
Stephan Obermann
Sven-Hendrik Haase
Sylvain Marié
Tadek Teleżyński
Takafumi Arakaki
Tarcisio Fischer
@@ -267,6 +284,7 @@ Tom Dalton
Tom Viner
Tomáš Gavenčiak
Tomer Keren
Tor Colvin
Trevor Bekolay
Tyler Goodlet
Tzu-ping Chung
@@ -277,6 +295,7 @@ Vidar T. Fauske
Virgil Dupras
Vitaly Lashmanov
Vlad Dragos
Vlad Radziuk
Vladyslav Rachek
Volodymyr Piskun
Wei Lin
@@ -2,6 +2,6 @@
Changelog
=========

The pytest CHANGELOG is located `here <https://docs.pytest.org/en/latest/changelog.html>`__.
The pytest CHANGELOG is located `here <https://docs.pytest.org/en/stable/changelog.html>`__.

The source document can be found at: https://github.com/pytest-dev/pytest/blob/master/doc/en/changelog.rst

Showing you all comments on commits in this comparison.

@blueyed

This comment has been minimized.

Copy link
Contributor

@blueyed blueyed commented on bde0ebc Jul 16, 2020

Moving this to atexit prevents pytest from turning any warnings (in particular pytest.PytestWarning from on_rm_rf_error) into errors.
I.e. you'll see the warnings during (interpreter) shutdown, but pytest's exit code does not reflect it.

@BrentWilkins

This comment has been minimized.

Copy link

@BrentWilkins BrentWilkins commented on 7ec6401 Aug 15, 2020

I'm running the 6.0.1 release, why is this still here? Something I could help with?

@nicoddemus

This comment has been minimized.

Copy link
Member Author

@nicoddemus nicoddemus commented on 7ec6401 Aug 16, 2020

Hi @BrentWilkins, what do you mean, the collect module?

We plan to deprecate it in 6.1.0 and eventually remove it in 7.0.

@The-Compiler

This comment has been minimized.

Copy link
Member

@The-Compiler The-Compiler commented on 7ec6401 Aug 16, 2020

@BrentWilkins Also see #7637