Commit Graph

12479 Commits

Author SHA1 Message Date
Ran Benita
71dfdca4df Enable check_untyped_defs mypy option for src/
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.
2020-06-05 11:34:20 +03:00
Ran Benita
848ab00663 Type annotate @pytest.mark.foo 2020-06-05 11:34:20 +03:00
Ran Benita
c0af19d8ad Type annotate more of _pytest.terminal 2020-06-05 11:34:20 +03:00
Ran Benita
2833884688 Type annotate pytest.fixture and more improvements to _pytest.fixtures 2020-06-05 11:34:20 +03:00
Ran Benita
8bcf1d6de1 Remove duplicated conversion of pytest.fixture() params argument
The FixtureFunctionMarker attrs class already converts the params
itself.

When adding types, the previous converter composition causes some type
error, but extracting it to a standalone function fixes the issue (a
lambda is not supported by the mypy plugin, currently).
2020-06-05 11:34:20 +03:00
Ran Benita
1bd7d025d9 Type annotate more of _pytest.fixtures 2020-06-05 11:34:20 +03:00
Ran Benita
f8bb61ae5b Type annotate _pytest.warnings 2020-06-05 11:34:20 +03:00
Ran Benita
01797e6370 Type annotate _pytest.debugging (a bit) 2020-06-05 11:34:20 +03:00
Ran Benita
216a010ab7 Type annotate _pytest.junitxml 2020-06-05 11:34:20 +03:00
Ran Benita
3e351afeb3 Type annotate _pytest.capture 2020-06-05 11:34:20 +03:00
Ran Benita
b51ea4f1a5 Type annotate _pytest.unittest 2020-06-05 11:34:20 +03:00
Ran Benita
db52928684 Type annotate _pytest.logging 2020-06-05 11:34:20 +03:00
Ran Benita
90e58f8961 Type annotate some parts related to runner & reports 2020-06-05 11:34:20 +03:00
Ran Benita
709bcbf3c4 Type annotate _pytest.mark.evaluate 2020-06-05 11:34:20 +03:00
Ran Benita
fc325bc0c3 Type annotate more of _pytest.nodes 2020-06-05 11:34:19 +03:00
Ran Benita
32dd0e87cb Type annotate _pytest.doctest 2020-06-05 11:34:19 +03:00
Ran Benita
387d9d04f7 Type annotate tricky reorder_items() function in fixtures.py 2020-06-05 11:34:19 +03:00
Ran Benita
e68a26199c Type annotate misc functions 2020-06-05 11:34:19 +03:00
Ran Benita
d95132178c Type annotate _pytest.assertion 2020-06-05 11:34:19 +03:00
Ran Benita
30e3d473c4 Type annotate _pytest._io.saferepr 2020-06-05 11:34:19 +03:00
Ran Benita
247c4c0482 Type annotate some more hooks & impls 2020-06-05 11:34:19 +03:00
Ran Benita
ef34729541 Type annotate fixtures.py & related 2020-06-05 11:34:19 +03:00
Ran Benita
be00e12d47 Type annotate main.py and some parts related to collection 2020-06-05 11:34:19 +03:00
Ran Benita
f8de424241 Type annotate CallSpec2 2020-06-05 11:34:19 +03:00
Ran Benita
0fb081aec6 Type annotate some hookspecs & impls
Annotate some "easy" arguments of hooks that repeat in a lot of internal
plugins.

Not all of the arguments are annotated fully for now.
2020-06-05 11:34:19 +03:00
Ran Benita
ff8b7884e8 Type annotate ParameterSet 2020-06-05 11:34:19 +03:00
Ran Benita
43fa1ee8f9 Type annotate some misc places with no particular connection 2020-06-05 11:34:19 +03:00
Ran Benita
e7c26a92d7 Merge pull request #7253 from bluetech/fixture-special-case
fixtures: remove special cases when deciding when pytest.fixture() is a direct decoration
2020-06-05 11:33:43 +03:00
Anthony Sottile
4c2703bccb Merge pull request #7317 from asottile/setup_cfg_fmt
Run setup-py-upgrade and setup-cfg-fmt
2020-06-04 10:23:24 -07:00
Anthony Sottile
789eea2464 Run setup-py-upgrade and setup-cfg-fmt
- also ran `pre-commit autoupdate`
- https://github.com/asottile/setup-py-upgrade
- https://github.com/asottile/setup-cfg-fmt
2020-06-04 09:58:58 -07:00
Bruno Oliveira
cf640a9b67 Merge pull request #7292 from kerizane/7259_iniconfig 2020-06-03 19:00:48 -03:00
Anthony Sottile
e75531791d Merge pull request #7315 from bluetech/rm-__multicall__
testing: change a test to not use deprecated pluggy __multicall__ protocol
2020-06-03 12:31:35 -07:00
Ran Benita
2e219ad4f3 testing: change a test to not use deprecated pluggy __multicall__ protocol
It is slated to be removed in pluggy 1.0.
2020-06-03 21:51:55 +03:00
Bruno Oliveira
61a6ac9705 Merge pull request #7242 from nicoddemus/fix-flaky-test
Introduce _pytest.timing as a way to control timing during internal tests
2020-06-02 20:25:02 -03:00
Anthony Sottile
5814f77455 Merge pull request #7303 from nicoddemus/flaky-ini-keys
Show invalid ini keys sorted
2020-06-02 12:30:33 -07:00
Bruno Oliveira
8ac18bbecb Show invalid ini keys sorted
Otherwise this relies on the dictionary order of `config.inicfg`, which
is insertion order in py36+ but "random" order in py35.
2020-06-02 16:01:47 -03:00
Bruno Oliveira
69d2ddcf1d Merge pull request #7302 from nicoddemus/cherry-pick-release
Merge pull request #7301 from pytest-dev/release-5.4.3
2020-06-02 14:36:01 -03:00
Bruno Oliveira
be1a2e440e Merge pull request #7301 from pytest-dev/release-5.4.3
Prepare release 5.4.3
2020-06-02 14:19:18 -03:00
Ran Benita
85b5a289f0 warnings: fix missing None in existing hook & add some docs (#7288) 2020-06-02 19:59:25 +03:00
Bruno Oliveira
7a8b8a5c9f Merge branch 'master' into fix-flaky-test 2020-06-02 11:33:15 -03:00
Bruno Oliveira
da5851c13e Update changelog/7291.trivial.rst 2020-06-02 11:01:37 -03:00
Ronny Pfannschmidt
8faf1e8eca Merge pull request #7286 from gnikonorov/issue_6856
Output a warning to stderr when an invalid key is read from an INI config file
2020-06-02 15:47:02 +02:00
xuiqzy
5517f7264f Remove doc line that is no longer relevant for Python3-only (#7263)
* Fix typo in capture.rst documentation

Rename ``capfsysbinary`` to ``capsysbinary`` as the former does not exist as far as i can see.

* Make Python uppercase in doc/en/capture.rst

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Remove the sentence entirely

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-06-02 15:56:39 +03:00
Gleb Nikonorov
a5d13d4ced Add changelog entry 2020-06-02 08:21:57 -04:00
Bruno Oliveira
589c6c6acc Merge pull request #7294 from nicoddemus/codecov-adjustments 2020-06-02 09:02:05 -03:00
Tor Colvin
fe64093411 Fix removal of very long paths on Windows (#6755)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-06-02 08:56:33 -03:00
Bruno Oliveira
eaf46f5354 Adjust codecov: only patch statuses
Fix #6994
2020-06-02 08:17:43 -03:00
Ran Benita
9214e63af3 ci: use fetch-depth: 0 instead of fetching manually (#7297) 2020-06-02 10:29:36 +03:00
Keri Volans
2748feed38 7291: Replace py.iniconfig with iniconfig 2020-06-01 18:09:57 +01:00
Bruno Oliveira
2f406bb9cb Replace custom flask theme by the official one (#6453)
Ref: #6402
2020-06-01 14:21:08 +02:00