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
AiOO/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
Zac-HD/pytest
Zearin/pytest
abusalimov/pytest
aivizionz/pytest
alertisme/pytest
alex/pytest
allankilpatrick/pytest
amfarrell/pytest
amueller/pytest
anntzer/pytest
aostr/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
mommeetcoffee/pytest
mouseratti/pytest
mvoitko/pytest
naveenkumar-grofers/pytest
nayyarv/pytest
nchammas/pytest
netme/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
sebastinas/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: 6.1.1
head repository: pytest-dev/pytest
Choose a Head Repository
pytest-dev/pytest
3h4x/pytest
AiOO/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
Zac-HD/pytest
Zearin/pytest
abusalimov/pytest
aivizionz/pytest
alertisme/pytest
alex/pytest
allankilpatrick/pytest
amfarrell/pytest
amueller/pytest
anntzer/pytest
aostr/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
mommeetcoffee/pytest
mouseratti/pytest
mvoitko/pytest
naveenkumar-grofers/pytest
nayyarv/pytest
nchammas/pytest
netme/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
sebastinas/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.2.2
This comparison is big! We’re only showing the most recent 250 commits
Commits on Oct 03, 2020
Prepare release 6.1.1

(cherry picked from commit 69d9032)
py36+: remove rexport of Path and PurePath
Merge pull request #7849 from pytest-dev/release-6.1.1
Commits on Oct 04, 2020
- Change the fixtures plugin to store its one piece of data on the node's
  Store instead of directly.

- Import FixtureLookupError lazily.
fixtures: some type annotations, remove cyclic dependency
py36+: pyupgrade: py36+
Commits on Oct 05, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Commits on Oct 06, 2020
py36+: com2ann
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
py36+: remove _pytest.compat.order_preserving_dict
Commits on Oct 07, 2020
Document that Parser.addini() can take, and defaults to, 'string'
Commits on Oct 08, 2020
Tanvi Mehta Tanvi Mehta
Use `collections.Counter` instead of a `dict` in `terminal.py` Issue #7868
Commits on Oct 09, 2020
…_in_contributing

ask for commit after changelog and authors file edit in contributing
Commits on Oct 10, 2020
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/agronholm/anyio/releases)
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst)
- [Commits](agronholm/anyio@2.0.0...2.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
Commits on Oct 11, 2020
release-on-comment: add "Closes <release issue number>" to release PR
Commits on Oct 12, 2020
…ns_integration/anyio-curiotrio--2.0.2

build(deps): bump anyio[curio,trio] from 2.0.0 to 2.0.2 in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@3.1.1...3.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
…ns_integration/django-3.1.2

build(deps): bump django from 3.1.1 to 3.1.2 in /testing/plugins_integration
Commits on Oct 13, 2020
Also include docstrings pointing to the counterparts in Pytester.

Fix #7892
Commits on Oct 14, 2020
List Testdir members in the docs
Commits on Oct 16, 2020
Commits on Oct 17, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Fix typos
iniconfig now has typing stubs which reveal a couple issues.
Commits on Oct 18, 2020
Suggested by Zac-HD.
Update mypy 0.782 -> 0.790, iniconfig typing
Commits on Oct 19, 2020
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 3.10.0 to 4.0.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](pytest-dev/pytest-django@v3.10.0...v4.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pytest-trio](https://github.com/python-trio/pytest-trio) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/python-trio/pytest-trio/releases)
- [Commits](python-trio/pytest-trio@v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
--lf has an optimization where it skips collecting Modules (python
files) which don't contain failing tests. The optimization works by
getting the paths of all cached failed tests and skipping the collection
of Modules whose path is not included in that list.

In pytest, Package nodes are Module nodes with the fspath being the file
`<package dir>/__init__.py`. Since it's a Module the logic above
triggered for it, and because it's an `__init__.py` file which is
unlikely to have any failing tests in it, it is skipped, which causes
its entire directory to be skipped, including any Modules inside it with
failing tests.

Fix by special-casing Packages to never filter. This means entire
Packages are never filtered, the Modules themselves are always checked.
It is reasonable to consider an optimization which does filter entire
packages bases on parent paths etc. but this wouldn't actually save any
real work so is really not worth it.
Commits on Oct 21, 2020
cacheprovider: fix some files in packages getting lost from --lf
We don't have any jobs that should go beyond that, so let's be nicer to
the CI host and quicker to report the failure.
ci: decrease job timeout from 6 hours to 30 minutes
Commits on Oct 22, 2020
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Commits on Oct 23, 2020
…ns_integration/pytest-django-4.0.0

build(deps): bump pytest-django from 3.10.0 to 4.0.0 in /testing/plugins_integration
…ns_integration/pytest-trio-0.7.0

build(deps): bump pytest-trio from 0.6.0 to 0.7.0 in /testing/plugins_integration
The "os" imports in the `tmp_path` and `tmpdir` fixture examples are
unused and thus have been removed to prevent confusion.
…tures

Since commit 0f918b1 pytest uses auto-generated autouse
pytest fixtures for the xunit fixtures
{setup,teardown}_{module,class,method,function}. All of these fixtures
were given the same name.

Unfortunately, pytest fixture lookup for a name works by grabbing all of
the fixtures globally declared with a name and filtering to only those
which match the specific node. So each xunit-using item iterates over a
list (of fixturedefs) of a size of all previous same-xunit-using items,
i.e. quadratic.

Fixing this properly to use a better data structure is likely to take
some effort, but we can avoid the immediate problem by just using
a different name for each item's autouse fixture, so it only matches
itself.

A benchmark is added to demonstrate the issue. It is still way too slow
after the fix and possibly still quadratic, but for a different reason
which is another matter.

Running --collect-only, before (snipped):

         202533232 function calls (201902604 primitive calls) in 86.379 seconds

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000   85.688   85.688 main.py:320(pytest_collection)
        1    0.000    0.000   85.688   85.688 main.py:567(perform_collect)
80557/556    0.021    0.000   85.050    0.153 {method 'extend' of 'list' objects}
85001/15001  0.166    0.000   85.045    0.006 main.py:785(genitems)
    10002    0.050    0.000   84.219    0.008 runner.py:455(collect_one_node)
    10002    0.049    0.000   83.763    0.008 runner.py:340(pytest_make_collect_report)
    10002    0.079    0.000   83.668    0.008 runner.py:298(from_call)
    10002    0.019    0.000   83.541    0.008 runner.py:341(<lambda>)
     5001    0.184    0.000   81.922    0.016 python.py:412(collect)
     5000    0.020    0.000   81.072    0.016 python.py:842(collect)
    30003    0.118    0.000   78.478    0.003 python.py:218(pytest_pycollect_makeitem)
    30000    0.190    0.000   77.957    0.003 python.py:450(_genfunctions)
    40001    0.081    0.000   76.664    0.002 nodes.py:183(from_parent)
    30000    0.087    0.000   76.629    0.003 python.py:1595(from_parent)
    40002    0.092    0.000   76.583    0.002 nodes.py:102(_create)
    30000    0.305    0.000   76.404    0.003 python.py:1533(__init__)
    15000    0.132    0.000   74.765    0.005 fixtures.py:1439(getfixtureinfo)
    15000    0.165    0.000   73.664    0.005 fixtures.py:1492(getfixtureclosure)
    15000    0.044    0.000   57.584    0.004 fixtures.py:1653(getfixturedefs)
    30000   18.840    0.001   57.540    0.002 fixtures.py:1668(_matchfactories)
 37507500   31.352    0.000   38.700    0.000 nodes.py:76(ischildnode)
    15000   10.464    0.001   15.806    0.001 fixtures.py:1479(_getautousenames)
112930587/112910019   7.333    0.000    7.339    0.000 {built-in method builtins.len}

After:

         51890333 function calls (51259706 primitive calls) in 27.306 seconds

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000   26.783   26.783 main.py:320(pytest_collection)
        1    0.000    0.000   26.783   26.783 main.py:567(perform_collect)
80557/556    0.020    0.000   26.108    0.047 {method 'extend' of 'list' objects}
85001/15001  0.151    0.000   26.103    0.002 main.py:785(genitems)
    10002    0.047    0.000   25.324    0.003 runner.py:455(collect_one_node)
    10002    0.045    0.000   24.888    0.002 runner.py:340(pytest_make_collect_report)
    10002    0.069    0.000   24.805    0.002 runner.py:298(from_call)
    10002    0.017    0.000   24.690    0.002 runner.py:341(<lambda>)
     5001    0.168    0.000   23.150    0.005 python.py:412(collect)
     5000    0.019    0.000   22.223    0.004 python.py:858(collect)
    30003    0.101    0.000   19.818    0.001 python.py:218(pytest_pycollect_makeitem)
    30000    0.161    0.000   19.368    0.001 python.py:450(_genfunctions)
    30000    0.302    0.000   18.236    0.001 python.py:1611(from_parent)
    40001    0.084    0.000   18.051    0.000 nodes.py:183(from_parent)
    40002    0.116    0.000   17.967    0.000 nodes.py:102(_create)
    30000    0.308    0.000   17.770    0.001 python.py:1549(__init__)
    15000    0.117    0.000   16.111    0.001 fixtures.py:1439(getfixtureinfo)
    15000    0.134    0.000   15.135    0.001 fixtures.py:1492(getfixtureclosure)
    15000    9.320    0.001   14.738    0.001 fixtures.py:1479(_getautousenames)
python: fix quadratic behavior in collection of items using xunit fixtures
pytester: minor doc fixes
Commits on Oct 24, 2020
…strings

Replace term 'triple' with 'tuple' in hookspec docstrings
ischildnode can be quite hot in some cases involving many fixtures.
However it is always used in a way that the nodeid is constant and the
baseid is iterated. So we can save work by pre-computing the parents of
the nodeid and use a simple containment test.

The `_getautousenames` function has the same stuff open-coded, so change
it to use the new function as well.
It turns out all autouse fixtures are kept in a global list, and thinned
out for a particular node using a linear scan of the entire list each
time.

Change the list to a dict, and only take the nodes we need.
fixtures: fix quadratic behavior in the number of autouse fixtures
Commits on Oct 25, 2020
Make the tests work when running with PYTHONPYCACHEPREFIX (possible when
running in a dirty environment, not under tox).
Part of investigating a bug, but didn't fix it.
In pytester tests, pytest stashes & restores the sys.modules for each
test. So if the test imports a new module, it is initialized anew each
time.

Turns out the readline module isn't multi-init safe, which causes
pytester.spawn to crash or hang. So preserve it as a workaround.
testing: fix pexpect hang
Commits on Oct 26, 2020
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.0.0 to 4.1.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](pytest-dev/pytest-django@v4.0.0...v4.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
…ns_integration/pytest-django-4.1.0

build(deps): bump pytest-django from 4.0.0 to 4.1.0 in /testing/plugins_integration
testdir uses pytester so this applies to it as well, but now includes
pytester as well.
testing: make conftest stuff check for pytester not testdir
#7942 test_helpconfig.py migrate from testdir to pytester
Commits on Oct 27, 2020
Refactor test_warning_types.py & test_mark.py to use pytester
Commits on Oct 28, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Update doctest.rst
Prepare release 6.1.2

(cherry picked from commit 1ed903e)
Merge pull request #7958 from pytest-dev/release-6.1.2
We run mypy through pre-commit, and we don't keep duplicate targets in
tox for all of the other linters. Since this adds some (small)
maintenance overhead, remove it.
Otherwise, mypy doesn't know about them and their types are considered
Any.
Commits on Oct 29, 2020
tox: remove checkqa-mypy environment
pre-commit: install typed dependencies in the mypy target
Commits on Oct 30, 2020
…ertion

Migrate test_assertion.py from testdir to pytester
…ation & --sw-skip functionality (#7939)

* adding --sw-skip shorthand for stepwise skip

* be explicit rather than implicit with default args for stepwise

* add constant for sw cache dir; only register plugin if necessary rather check check activity always;

* use str format; remove unused args in hooks

* assert cache upfront, allow stepwise to have a reference to the cache

* type hinting lf, skip, move literal strings into module constants

* convert parametrized option into a list

* add a sessionfinish hook for stepwise to keep backwards behaviour the same

* add changelog for #7938

* Improve performance of stepwise modifyitems & address PR feedback

* add test for stepwise deselected based on performance enhancements

* Apply suggestions from code review

* delete from items, account for edge case where failed_index = 0

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
It doesn't serve any purpose that I am able to discern.
…tester

#7942 refactor stepwise tests to utilize pytester
Commits on Oct 31, 2020
Make the objects more light weight.

Remove unused properties.
Manually add the remaining 4.6.x release notes to the changelog
pathlib: fix symlinked directories not followed during collection
Add FunctionDefinition to the reference docs
Add support to display field names in namedtuple diffs.
When pytest was run on a directory containing a recursive symlink it failed
with ELOOP as the library was not able to determine the type of the
direntry:

src/_pytest/main.py:685: in collect
    if not direntry.is_file():
E   OSError: [Errno 40] Too many levels of symbolic links: '/home/florian/proj/pytest/tests/recursive'

This is fixed by handling ELOOP and other errors in the visit function in
pathlib.py, so the entries whose is_file() call raises an OSError with the
pre-defined list of error numbers will be exluded from the result.

The _ignore_errors function was copied from Lib/pathlib.py of cpython 3.9.

Fixes #7951
Fix handling recursive symlinks
Commits on Nov 01, 2020
Supposed to be faster.
code: a few minor improvements
…UpClass/setup_method

This is similar to 50114d4; I missed that unittest does the
same thing.
Commits on Nov 03, 2020
unittest: fix quadratic behavior in collection of unittests using setUpClass/setup_method
Commits on Nov 04, 2020
 - Add name to AUTHORS
Commits on Nov 05, 2020
#7942 test_session.py migrate from testdir to Pytester
This causes some tests to fail when using these older versions.
testing: silence deprecation warning from older pyparsing releases
Commits on Nov 06, 2020
Fix #7530
Commits on Nov 07, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
fixtures: deprecate pytest.yield_fixture()
Don't import `pytest` from within some `_pytest` modules since an
upcoming commit will import from them into `pytest`.

It would have been nice not to have to do it, so that internal plugins
look more like external plugins, but with the existing layout this seems
unavoidable.
…" warning

The test suite passes without it being ignored. The absence of this
warning cost me some head-scratching time, so enable it again.
Commits on Nov 08, 2020
testing: don't ignore "Module already imported so cannot be rewritten" warning
Stop importing `pytest` to avoid upcoming import cycles
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
A bit shorter and a better name, IMHO.
Commits on Nov 09, 2020
Bumps [django](https://github.com/django/django) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@3.1.2...3.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
…ns_integration/django-3.1.3

build(deps): bump django from 3.1.2 to 3.1.3 in /testing/plugins_integration
We want to export `pytest.MonkeyPatch` for the purpose of
type-annotating the `monkeypatch` fixture. For other fixtures we export
in this way, we also make direct construction of them (e.g.
`MonkeyPatch()`) private. But unlike the others, `MonkeyPatch` is also
widely used directly already, mostly because the `monkeypatch` fixture
only works in `function` scope (issue #363), but also in other cases. So
making it private will be annoying and we don't offer a decent
replacement yet.

So, let's just make direct construction public & documented.
Export MonkeyPatch as pytest.MonkeyPatch
Commits on Nov 10, 2020
…it__.py

When --doctest-modules is used, an `__init__.py` file is not a `Package`
but a `DoctestModule`, but some collection code assumed that
`__init__.py` implies a `Package`. That code caused only a single test
to be collected in the scenario in the subject.

Tighten up this check to explicitly check for `Package`. There are
better solutions, but for another time.

Report & test by Nick Gates <nickgatzgates@gmail.com>.
Commits on Nov 11, 2020
Fixes #8023.
Co-authored-by: Sanket Duthade <duthades@gmail.com>
Co-authored-by: Sanket Duthade <duthades@gmail.com>
Co-authored-by: Sanket Duthade <duthades@gmail.com>
Commits on Nov 12, 2020
Add 'node_modules' to norecursedirs
Commits on Nov 13, 2020
Migrate from testdir to pytester
main: fix only one doctest collected on pytest --doctest-modules __init__.py
…itself

An upcoming commit wants to import from `_pytest.pytester` in the public
`pytest` module. This means that `_pytest.pytester` would start to get
imported during import time, which it hasn't up to now -- it was
imported by the plugin loader (if requested). When a plugin is loaded,
it is subjected to assertion rewriting, but only if the module isn't
imported yet, it issues a warning "Module already imported so cannot be
rewritten" and skips the rewriting. So we'd end up with the pytester
plugin not being rewritten, but it wants to be.

Absent better ideas, the solution here is to split the pytester
assertions to their own plugin (which will always only be imported by
the plugin loader) and exclude pytester itself from plugin rewriting.
In order to allow users to type annotate fixtures they request, the
types need to be imported from the `pytest` namespace. They are/were
always available to import from the `_pytest` namespace, but that is
not guaranteed to be stable.

These types are only exported for the purpose of typing. Specifically,
the following are *not* public:

- Construction (`__init__`)
- Subclassing
- staticmethods and classmethods

We try to combat them being used anyway by:

- Marking the classes as `@final` when possible (already done).

- Not documenting private stuff in the API Reference.

- Using `_`-prefixed names or marking as `:meta private:` for private
  stuff.

- Adding a keyword-only `_ispytest=False` to private constructors,
  warning if False, and changing pytest itself to pass True. In the
  future it will (hopefully) become a hard error.

Hopefully that will be enough.
We want to reserve other tags for our own purposes without it creating a
release.
…aster

This is needed so setuptools-scm in master shows an accurate version.
In particular, higher than the stable branch.
RELEASING: make sure we have an accurate version in a commit in master
Add pythonenv* to gitignore
Commits on Nov 14, 2020
Python 3.7 changes the pyc format by adding a flags byte. Even though it
is not necessary for us to match it, it is nice to be able to read pyc
files we emit for debugging the rewriter.

Update our custom pyc files to use that format. We write flags==0
meaning we still use the mtime+size format rather the newer hash format.
assertion/rewrite: write pyc's according to PEP-552 on Python>=3.7
Commits on Nov 16, 2020
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 2.1.1 to 3.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-html@v2.1.1...v3.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
#7942 migrate from tempdir to pytester
ci: fix deprecation message & couple updates
Commits on Nov 17, 2020
stop assigning nextline if its potentially not used
Commits on Nov 19, 2020
…ns_integration/pytest-html-3.0.0

build(deps): bump pytest-html from 2.1.1 to 3.0.0 in /testing/plugins_integration
* Prefix contextmanagers with module name in doc examples

* Import pytest explicitly for doctests

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
The section currently features the nose2pytest tool with plans to expand
on some of the common gotchas when performing such migrations.
Add small section on migrating from nose to pytest.
Follow-up to #8048 which seems to have been merged without the suggested changes.
Fix nose documentation
Commits on Nov 20, 2020
If the user passed stdin=PIPE for some reason, they have no way to close
it themselves since it is not exposed.
Commits on Nov 21, 2020
)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
While adding links to #8052, noticed
a few more missing.
Add links to some CHANGELOG entries
Commits on Nov 23, 2020
Commits on Nov 24, 2020
Commits on Nov 25, 2020
fix mock_timing fixture name (typo) in timing.py
Commits on Nov 28, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Explanation: The default handling of these lifetimes is done in
`tmpdir.TempPathFactory.getbasetemp`, which passes `keep=3` to
`pathlib.make_numbered_dir_with_cleanup`.

GH Issue: #8036
Commits on Nov 30, 2020
* Custom multiple marker execution order

#8020 issue stated that ordering of multiple custom markers is from inside - out. I have added example for the same in the documentation. Please let me know for further changes / concerns.

* remove trailing spaces

The last commit was failing due to extra spaces

* Ran tox tests locally to debug white space trimming issues

* Resolve: ERROR:   docs: commands failed for tox -e docs

* Update doc/en/reference.rst

Committed PR suggestions.

Co-authored-by: Florian Bruhin <me@the-compiler.org>

* Added reference to Node.iter_markers_with_node in documentation

* Add myself to Authors

Co-authored-by: Shubham <shubham.adep@wsu.edu>
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Commits on Dec 01, 2020
Bumps [pytest-flakes](https://github.com/asmeurer/pytest-flakes) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/asmeurer/pytest-flakes/releases)
- [Commits](https://github.com/asmeurer/pytest-flakes/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Migrate test_nose.py from testdir to pytester
…seopt

Migrate test_parseopt.py from testdir to pytester
Commits on Dec 02, 2020
…tebin

Migrate test_pastebin.py from testdir to pytester
Commits on Dec 04, 2020
As per #8088
Commits on Dec 05, 2020
Export types of builtin fixtures for type annotations
Add unraisableexception and threadexception plugins
Docs: Note lifetime of temporary directories
List pytest-doctestplus in doctest docs
Commits on Dec 07, 2020
Bumps [django](https://github.com/django/django) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@3.1.3...3.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/CHANGES.rst)
- [Commits](pytest-dev/pytest-html@v3.0.0...v3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
…ns_integration/django-3.1.4

build(deps): bump django from 3.1.3 to 3.1.4 in /testing/plugins_integration
…ns_integration/pytest-html-3.1.0

build(deps): bump pytest-html from 3.0.0 to 3.1.0 in /testing/plugins_integration
Commits on Dec 08, 2020
)

* Migrate to pytester: test_capture.py, test_config.py, approx.py

* migrate test_terminal.py

* revert test_config.py

* more typing in test_terminal.py

* try-out 'tr' fixture update

* revert 'tr' fixture, update test_config.py
Commits on Dec 09, 2020
Issue 2044 - show skipping reason in verbose mode
Commits on Dec 12, 2020
Add a new hook , `pytest_markeval_namespace` which should return a dictionary.
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.

Pseudo example

``conftest.py``:

.. code-block:: python
   def pytest_markeval_namespace():
       return {"color": "red"}
``test_func.py``:

.. code-block:: python
   @pytest.mark.skipif("color == 'blue'", reason="Color is not red")
   def test_func():
       assert False
…-hook

Add `pytest_markeval_namespace` hook.
Causes some trouble in CI and not really needed as old pip should still
work.
tox: remove requires: pip>=20.3.1
The env var effects all of the pip installs, including regendoc which
also uses setuptools-scm, so it gets the wrong version, and fails to
install with the new pip resolver:

    ERROR: Requested regendoc from https://files.pythonhosted.org/packages/a8/5d/206e4951420bf5bbe1475c66eb06ec40d9177035e223858fee890eed0188/regendoc-0.6.1.tar.gz#sha256=db1e8c9ae02c1af559eae105bfd77ba41ed07fc8ca7030ea59db5f3f161236a4 has different version in metadata: '6.2.0'
tox: use pip legacy resolver for regen job
Avoid showing a line like

    x.py::test_4 XPASS ()   [100%]

which looks funny.
terminal: when the skip/xfail is empty, don't show it as "()"
pytest-pygments doesn't yet recognize the skip reason in summary line
added recently. Workaround it until we get to updating it.
doc: temporary workaround for pytest-pygments lexing error
Prepare release 6.2.0
Commits on Dec 13, 2020
Compare also paths on Windows when considering ImportPathMismatchError
[6.2] Merge pull request #8123 from nicoddemus/import-mismatch-unc
Commits on Dec 15, 2020
[6.2.x] python_api: handle array-like args in approx() #8137
Prepare release 6.2.1
Commits on Dec 16, 2020
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
[6.2.x] Clarify fixture execution order and provide visual aids (#7381)
Commits on Dec 17, 2020
terminal: fix "(<Skipped instance>)" skip reason in test status line
(cherry picked from commit 02e69e5)
[6.2.x] terminal: fix "(<Skipped instance>)" skip reason in test status line
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
[6.2.x] Add Changelog to setup.cfg (#8166)
Commits on Jan 05, 2021
DOC: Mark pytest module
[6.2.x] DOC: Mark pytest module
doc: Add note about training early bird discount
Commits on Jan 20, 2021
[6.2.x] Fix faulthandler for Twisted Logger when used with "--capture=no"
Commits on Jan 25, 2021
Showing with 11,044 additions and 6,048 deletions.
  1. +20 −0 .github/ISSUE_TEMPLATE/2_feature_request.md
  2. +11 −0 .github/dependabot.yml
  3. +12 −23 .github/workflows/main.yml
  4. +1 −0 .gitignore
  5. +18 −9 .pre-commit-config.yaml
  6. +0 −60 .travis.yml
  7. +16 −0 AUTHORS
  8. +5 −6 CONTRIBUTING.rst
  9. +1 −1 README.rst
  10. +8 −0 RELEASING.rst
  11. +13 −0 bench/unit_test.py
  12. +11 −0 bench/xunit.py
  13. +0 −1 changelog/1477.doc.rst
  14. +0 −20 changelog/1953.bugfix.rst
  15. +0 −3 changelog/4984.bugfix.rst
  16. +0 −18 changelog/5585.breaking.rst
  17. +0 −3 changelog/6681.improvement.rst
  18. +0 −1 changelog/6981.deprecation.rst
  19. +0 −6 changelog/7097.deprecation.rst
  20. +0 −5 changelog/7210.deprecation.rst
  21. +0 −2 changelog/7255.deprecation.rst
  22. +0 −3 changelog/7536.trivial.rst
  23. +0 −1 changelog/7572.improvement.rst
  24. +0 −1 changelog/7587.trivial.rst
  25. +0 −1 changelog/7591.bugfix.rst
  26. +0 −1 changelog/7628.bugfix.rst
  27. +0 −2 changelog/7631.trivial.rst
  28. +0 −1 changelog/7638.bugfix.rst
  29. +0 −3 changelog/7648.deprecation.rst
  30. +0 −1 changelog/7667.feature.rst
  31. +0 −6 changelog/7671.trivial.rst
  32. +0 −3 changelog/7685.improvement.rst
  33. +0 −1 changelog/7742.bugfix.rst
  34. +0 −3 changelog/7780.improvement.rst
  35. +6 −0 doc/en/announce/index.rst
  36. +44 −0 doc/en/announce/release-6.1.0.rst
  37. +18 −0 doc/en/announce/release-6.1.1.rst
  38. +22 −0 doc/en/announce/release-6.1.2.rst
  39. +76 −0 doc/en/announce/release-6.2.0.rst
  40. +20 −0 doc/en/announce/release-6.2.1.rst
  41. +21 −0 doc/en/announce/release-6.2.2.rst
  42. +4 −4 doc/en/assert.rst
  43. +3 −3 doc/en/backwards-compatibility.rst
  44. +38 −24 doc/en/builtin.rst
  45. +460 −0 doc/en/changelog.rst
  46. +22 −1 doc/en/conf.py
  47. +22 −0 doc/en/deprecations.rst
  48. +59 −16 doc/en/doctest.rst
  49. +1 −1 doc/en/example/assertion/failure_demo.py
  50. +1 −1 doc/en/example/assertion/global_testmodule_config/conftest.py
  51. +132 −0 doc/en/example/fixtures/fixture_availability.svg
  52. +142 −0 doc/en/example/fixtures/fixture_availability_plugins.svg
  53. +0 −38 doc/en/example/fixtures/test_fixtures_order.py
  54. +45 −0 doc/en/example/fixtures/test_fixtures_order_autouse.py
  55. +64 −0 doc/en/example/fixtures/test_fixtures_order_autouse.svg
  56. +31 −0 doc/en/example/fixtures/test_fixtures_order_autouse_multiple_scopes.py
  57. +76 −0 doc/en/example/fixtures/test_fixtures_order_autouse_multiple_scopes.svg
  58. +36 −0 doc/en/example/fixtures/test_fixtures_order_autouse_temp_effects.py
  59. +100 −0 doc/en/example/fixtures/test_fixtures_order_autouse_temp_effects.svg
  60. +45 −0 doc/en/example/fixtures/test_fixtures_order_dependencies.py
  61. +60 −0 doc/en/example/fixtures/test_fixtures_order_dependencies.svg
  62. +51 −0 doc/en/example/fixtures/test_fixtures_order_dependencies_flat.svg
  63. +60 −0 doc/en/example/fixtures/test_fixtures_order_dependencies_unclear.svg
  64. +36 −0 doc/en/example/fixtures/test_fixtures_order_scope.py
  65. +55 −0 doc/en/example/fixtures/test_fixtures_order_scope.svg
  66. +29 −0 doc/en/example/fixtures/test_fixtures_request_different_scope.py
  67. +115 −0 doc/en/example/fixtures/test_fixtures_request_different_scope.svg
  68. +7 −2 doc/en/example/markers.rst
  69. +2 −2 doc/en/example/multipython.py
  70. +1 −1 doc/en/example/nonpython.rst
  71. +1 −1 doc/en/example/nonpython/conftest.py
  72. +5 −5 doc/en/example/parametrize.rst
  73. +4 −4 doc/en/example/pythoncollection.rst
  74. +1 −1 doc/en/example/reportingdemo.rst
  75. +3 −3 doc/en/example/simple.rst
  76. +1,336 −417 doc/en/fixture.rst
  77. +2 −2 doc/en/getting-started.rst
  78. +2 −2 doc/en/index.rst
  79. +9 −0 doc/en/nose.rst
  80. +95 −61 doc/en/reference.rst
  81. +3 −3 doc/en/skipping.rst
  82. +3 −8 doc/en/tmpdir.rst
  83. +32 −0 doc/en/usage.rst
  84. +6 −6 doc/en/warnings.rst
  85. +27 −21 doc/en/writing_plugins.rst
  86. +4 −3 pyproject.toml
  87. +6 −2 scripts/release-on-comment.py
  88. +5 −11 scripts/release.py
  89. +7 −9 setup.cfg
  90. +2 −2 src/_pytest/_argcomplete.py
  91. +91 −70 src/_pytest/_code/code.py
  92. +21 −20 src/_pytest/_code/source.py
  93. +1 −1 src/_pytest/_io/saferepr.py
  94. +6 −6 src/_pytest/_io/terminalwriter.py
  95. +2 −2 src/_pytest/assertion/__init__.py
  96. +78 −69 src/_pytest/assertion/rewrite.py
  97. +3 −3 src/_pytest/assertion/truncate.py
  98. +28 −29 src/_pytest/assertion/util.py
  99. +62 −33 src/_pytest/cacheprovider.py
  100. +38 −41 src/_pytest/capture.py
  101. +16 −70 src/_pytest/compat.py
  102. +52 −51 src/_pytest/config/__init__.py
  103. +24 −23 src/_pytest/config/argparsing.py
  104. +7 −10 src/_pytest/config/findpaths.py
  105. +14 −14 src/_pytest/debugging.py
  106. +38 −3 src/_pytest/deprecated.py
  107. +20 −20 src/_pytest/doctest.py
  108. +6 −1 src/_pytest/faulthandler.py
  109. +170 −157 src/_pytest/fixtures.py
  110. +8 −10 src/_pytest/helpconfig.py
  111. +24 −3 src/_pytest/hookspec.py
  112. +22 −22 src/_pytest/junitxml.py
  113. +36 −32 src/_pytest/logging.py
  114. +56 −48 src/_pytest/main.py
  115. +6 −8 src/_pytest/mark/__init__.py
  116. +6 −9 src/_pytest/mark/expression.py
  117. +38 −45 src/_pytest/mark/structures.py
  118. +29 −23 src/_pytest/monkeypatch.py
  119. +60 −73 src/_pytest/nodes.py
  120. +7 −7 src/_pytest/outcomes.py
  121. +3 −3 src/_pytest/pastebin.py
  122. +71 −21 src/_pytest/pathlib.py
  123. +516 −238 src/_pytest/pytester.py
  124. +66 −0 src/_pytest/pytester_assertions.py
  125. +87 −71 src/_pytest/python.py
  126. +119 −72 src/_pytest/python_api.py
  127. +40 −38 src/_pytest/recwarn.py
  128. +31 −27 src/_pytest/reports.py
  129. +21 −20 src/_pytest/runner.py
  130. +15 −7 src/_pytest/skipping.py
  131. +38 −41 src/_pytest/stepwise.py
  132. +1 −1 src/_pytest/store.py
  133. +197 −100 src/_pytest/terminal.py
  134. +90 −0 src/_pytest/threadexception.py
  135. +1 −1 src/_pytest/timing.py
  136. +61 −32 src/_pytest/tmpdir.py
  137. +61 −18 src/_pytest/unittest.py
  138. +93 −0 src/_pytest/unraisableexception.py
  139. +24 −8 src/_pytest/warning_types.py
  140. +1 −1 src/_pytest/warnings.py
  141. +25 −1 src/pytest/__init__.py
  142. +310 −286 testing/acceptance_test.py
  143. +10 −9 testing/code/test_code.py
  144. +16 −24 testing/code/test_excinfo.py
  145. +19 −26 testing/code/test_source.py
  146. +10 −31 testing/conftest.py
  147. +60 −1 testing/deprecated_test.py
  148. +1 −1 testing/example_scripts/issue_519.py
  149. +1 −1 testing/example_scripts/unittest/test_unittest_asyncio.py
  150. +1 −1 testing/example_scripts/unittest/test_unittest_asynctest.py
  151. +2 −2 testing/logging/test_formatter.py
  152. +10 −12 testing/logging/test_reporting.py
  153. +15 −0 testing/plugins_integration/requirements.txt
  154. +97 −9 testing/python/approx.py
  155. +1 −1 testing/python/collect.py
  156. +39 −53 testing/python/fixtures.py
  157. +2 −2 testing/python/integration.py
  158. +11 −11 testing/python/metafunc.py
  159. +1 −6 testing/python/raises.py
  160. +5 −15 testing/test_argcomplete.py
  161. +222 −172 testing/test_assertion.py
  162. +283 −210 testing/test_assertrewrite.py
  163. +38 −9 testing/test_cacheprovider.py
  164. +204 −191 testing/test_capture.py
  165. +396 −345 testing/test_collection.py
  166. +22 −25 testing/test_compat.py
  167. +389 −323 testing/test_config.py
  168. +163 −137 testing/test_conftest.py
  169. +195 −172 testing/test_debugging.py
  170. +253 −243 testing/test_doctest.py
  171. +6 −5 testing/test_error_diffs.py
  172. +45 −19 testing/test_faulthandler.py
  173. +1 −1 testing/test_findpaths.py
  174. +31 −32 testing/test_helpconfig.py
  175. +8 −9 testing/test_junitxml.py
  176. +1 −3 testing/test_link_resolve.py
  177. +4 −4 testing/test_main.py
  178. +191 −170 testing/test_mark.py
  179. +2 −4 testing/test_meta.py
  180. +14 −7 testing/test_monkeypatch.py
  181. +45 −20 testing/test_nodes.py
  182. +57 −56 testing/test_nose.py
  183. +6 −4 testing/test_parseopt.py
  184. +22 −19 testing/test_pastebin.py
  185. +35 −1 testing/test_pathlib.py
  186. +1 −1 testing/test_pluginmanager.py
  187. +24 −17 testing/test_pytester.py
  188. +15 −14 testing/test_recwarn.py
  189. +13 −40 testing/test_reports.py
  190. +10 −14 testing/test_runner.py
  191. +30 −29 testing/test_runner_xunit.py
  192. +82 −78 testing/test_session.py
  193. +42 −39 testing/test_setuponly.py
  194. +19 −10 testing/test_setupplan.py
  195. +372 −207 testing/test_skipping.py
  196. +56 −40 testing/test_stepwise.py
  197. +515 −333 testing/test_terminal.py
  198. +137 −0 testing/test_threadexception.py
  199. +50 −47 testing/test_tmpdir.py
  200. +171 −16 testing/test_unittest.py
  201. +133 −0 testing/test_unraisableexception.py
  202. +7 −6 testing/test_warning_types.py
  203. +5 −5 testing/test_warnings.py
  204. +15 −38 tox.ini
@@ -3,3 +3,23 @@ name: 🚀 Feature Request
about: Ideas for new features and improvements

---

<!--
Thanks for suggesting a feature!
Quick check-list while suggesting features:
-->

#### What's the problem this feature will solve?
<!-- What are you trying to do, that you are unable to achieve with pytest as it currently stands? -->

#### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

<!-- Provide examples of real-world use cases that this would enable and how it solves the problem described above. -->

#### Alternative Solutions
<!-- Have you tried to workaround the problem using a pytest plugin or other tools? Or a different approach to solving this issue? Please elaborate here. -->

#### Additional context
<!-- Add any other context, links, etc. about the feature here. -->
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/testing/plugins_integration"
schedule:
interval: weekly
time: "03:00"
open-pull-requests-limit: 10
allow:
- dependency-type: direct
- dependency-type: indirect
@@ -6,7 +6,8 @@ on:
- master
- "[0-9]+.[0-9]+.x"
tags:
- "*"
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"

pull_request:
branches:
@@ -16,18 +17,17 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
name: [
"windows-py35",
"windows-py36",
"windows-py37",
"windows-py37-pluggy",
"windows-py38",

"ubuntu-py35",
"ubuntu-py36",
"ubuntu-py37",
"ubuntu-py37-pluggy",
@@ -45,11 +45,6 @@ jobs:
]

include:
- name: "windows-py35"
python: "3.5"
os: windows-latest
tox_env: "py35-xdist"
use_coverage: true
- name: "windows-py36"
python: "3.6"
os: windows-latest
@@ -68,18 +63,14 @@ jobs:
tox_env: "py38-unittestextras"
use_coverage: true

- name: "ubuntu-py35"
python: "3.5"
os: ubuntu-latest
tox_env: "py35-xdist"
- name: "ubuntu-py36"
python: "3.6"
os: ubuntu-latest
tox_env: "py36-xdist"
- name: "ubuntu-py37"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-lsof-numpy-oldattrs-pexpect"
tox_env: "py37-lsof-numpy-pexpect"
use_coverage: true
- name: "ubuntu-py37-pluggy"
python: "3.7"
@@ -94,7 +85,7 @@ jobs:
os: ubuntu-latest
tox_env: "py38-xdist"
- name: "ubuntu-py39"
python: "3.9-dev"
python: "3.9"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-pypy3"
@@ -133,12 +124,6 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
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@v2.0.0
if: matrix.python == '3.9-dev'
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
@@ -175,18 +160,22 @@ jobs:
- 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
run: echo "name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pip install tox
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- run: tox -e linting

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

runs-on: ubuntu-latest
timeout-minutes: 30

needs: [build]

@@ -34,6 +34,7 @@ issue/
env/
.env/
.venv/
/pythonenv*/
3rdparty/
.tox
.cache
@@ -5,12 +5,12 @@ repos:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
rev: v1.8.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -21,35 +21,44 @@ repos:
exclude: _pytest/(debugging|hookspec).py
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.2
rev: 3.8.3
hooks:
- id: flake8
language_version: python3
additional_dependencies:
- flake8-typing-imports==1.9.0
- flake8-docstrings==1.5.0
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.0
rev: v2.3.5
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py3-plus]
args: ['--application-directories=.:src', --py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.4.4
rev: v2.7.2
hooks:
- id: pyupgrade
args: [--py3-plus]
args: [--py36-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.9.0
rev: v1.11.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/pygrep-hooks
rev: v1.6.0
hooks:
- id: python-use-type-annotations
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.780 # NOTE: keep this in sync with setup.cfg.
rev: v0.790
hooks:
- id: mypy
files: ^(src/|testing/)
args: []
additional_dependencies:
- iniconfig>=1.1.0
- py>=1.8.2
- attrs>=19.2.0
- packaging
- repo: local
hooks:
- id: rst

This file was deleted.

16 AUTHORS
@@ -21,6 +21,7 @@ Anders Hovmöller
Andras Mitzki
Andras Tim
Andrea Cimatoribus
Andreas Motl
Andreas Zeidler
Andrey Paramonov
Andrzej Klajnert
@@ -32,6 +33,7 @@ Anthony Sottile
Anton Lodder
Antony Lee
Arel Cordero
Ariel Pillemer
Armin Rigo
Aron Coyle
Aron Curzon
@@ -55,11 +57,13 @@ Charles Cloud
Charles Machalow
Charnjit SiNGH (CCSJ)
Chris Lamb
Chris NeJame
Christian Boelsen
Christian Fetzer
Christian Neumüller
Christian Theunert
Christian Tismer
Christine Mecklenborg
Christoph Buelter
Christopher Dignam
Christopher Gilling
@@ -87,6 +91,7 @@ Dhiren Serai
Diego Russo
Dmitry Dygalo
Dmitry Pribysh
Dominic Mortlock
Duncan Betts
Edison Gustavo Muenz
Edoardo Batini
@@ -107,6 +112,7 @@ Florian Bruhin
Florian Dahlitz
Floris Bruynooghe
Gabriel Reis
Garvit Shubham
Gene Wood
George Kussumoto
Georgy Dyuldin
@@ -129,6 +135,7 @@ Ilya Konstantinov
Ionuț Turturică
Iwan Briquemont
Jaap Broekhuizen
Jakob van Santen
Jakub Mitoraj
Jan Balster
Janne Vanhala
@@ -153,6 +160,7 @@ Justyna Janczyszyn
Kale Kundert
Kamran Ahmad
Karl O. Pinc
Karthikeyan Singaravelan
Katarzyna Jachim
Katarzyna Król
Katerina Koukiou
@@ -195,6 +203,7 @@ Matthias Hafner
Maxim Filipenko
Maximilian Cosmo Sitter
mbyt
Mickey Pashov
Michael Aquilina
Michael Birtwell
Michael Droettboom
@@ -227,11 +236,14 @@ Pauli Virtanen
Pavel Karateev
Paweł Adamczak
Pedro Algarvio
Petter Strandmark
Philipp Loose
Pieter Mulder
Piotr Banaszkiewicz
Piotr Helm
Prakhar Gurunani
Prashant Anand
Prashant Sharma
Pulkit Goyal
Punyashloka Biswal
Quentin Pradet
@@ -256,10 +268,12 @@ Ryan Wooden
Samuel Dion-Girardeau
Samuel Searles-Bryant
Samuele Pedroni
Sanket Duthade
Sankt Petersbug
Segev Finer
Serhii Mozghovyi
Seth Junot
Shubham Adep
Simon Gomizelj
Simon Kerr
Skylar Downes
@@ -274,6 +288,7 @@ Sven-Hendrik Haase
Sylvain Marié
Tadek Teleżyński
Takafumi Arakaki
Tanvi Mehta
Tarcisio Fischer
Tareq Alayan
Ted Xiao
@@ -310,3 +325,4 @@ Xuecong Liao
Yoav Caspi
Zac Hatfield-Dodds
Zoltán Máté
Zsolt Cserna

No commit comments for this range