Ran Benita
2aaea20cb2
Use {node,config}.stash instead of ._store
...
Use the public name. The `_store` name is only because some plugins
started using it anyway - will be removed at some point.
2021-07-24 17:40:08 +03:00
Ronny Pfannschmidt
9052a9e313
Merge pull request #8462 from RonnyPfannschmidt/main_fixup_followup
...
port the rest of the scripts/docs over to the main branch
2021-03-27 15:49:20 +01:00
Bruno Oliveira
be8d63e33b
Increase truncation threshold with -v, disable with -vv
...
Fix #6682
Fix #8403
2021-03-26 07:05:30 -03:00
Ronny Pfannschmidt
ff6d5ae278
port the rest of the scripts/docs over to the main branch
2021-03-18 22:13:12 +01:00
Anthony Sottile
33d119f71a
py36+: com2ann
2020-10-05 18:33:17 -07:00
Anthony Sottile
a238d1f37d
py36+: remove TYPE_CHECKING from _pytest.compat
...
automated with:
```bash
git grep -l 'from .* import TYPE_CHECKING' |
xargs reorder-python-imports \
--application-directories .:src \
--remove-import 'from _pytest.compat import TYPE_CHECKING' \
--add-import 'from typing import TYPE_CHECKING'
```
2020-10-02 15:03:24 -07:00
Ran Benita
9ab14c6d9c
typing: set warn_unreachable
...
This makes mypy raise an error whenever it detects code which is
statically unreachable, e.g.
x: int
if isinstance(x, str):
... # Statement is unreachable [unreachable]
This is really neat and finds quite a few logic and typing bugs.
Sometimes the code is intentionally unreachable in terms of types, e.g.
raising TypeError when a function is given an argument with a wrong
type. In these cases a `type: ignore[unreachable]` is needed, but I
think it's a nice code hint.
2020-08-04 09:59:46 +03:00
Ran Benita
0242de4f56
Format docstrings in a consistent style
2020-08-01 17:14:37 +03:00
Lukas Geiger
97d2c711e6
Reduce calls of Node.ihook
2020-06-26 14:46:37 +02: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
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
Daniel Hahler
691a7fceea
Revisit some help texts with regard to newlines
2020-05-19 19:34:08 -03:00
Daniel Hahler
ad4c1071d9
doc: internal: remove references to old "newinterpret" module
...
This has been merged into the (only) assertrewrite mode.
2020-04-09 01:40:23 +02:00
Daniel Hahler
bce1d40fb0
tests: harden test_reprcompare_notin, factor out callop ( #6764 )
...
* tests: assertion: factor out `callop`, typing
* tests: harden test_reprcompare_notin
2020-03-08 01:23:19 +01:00
Ran Benita
678d65f051
Store AssertionState in config's store instead of attribute
...
Part of moving away from ad-hoc attributes to using the config's store.
2020-03-06 11:27:01 +02:00
Daniel Hahler
aa0328782f
assertion: save/restore hooks on item ( #6646 )
2020-02-04 02:56:23 +01:00
Daniel Hahler
88b800355a
typing: pytest_collection
2020-01-30 19:58:43 +01:00
Ran Benita
090e260517
master: update mypy 0.740 -> 0.761
...
(cherry picked from commit 16ff9f591e
)
(cherry picked from commit 4848bbdf9a
)
2020-01-14 06:31:41 +01:00
Bruno Oliveira
0cf2002a1f
Explicitly implement pytest_assertrepr_compare in assertion plugin
...
Previously it was an alias, which makes it unnecessary hard to find
all implementations (either by IDE or using a simple search).
2019-11-07 18:00:27 -03:00
Ran Benita
7259c453d6
Fix some check_untyped_defs = True mypy warnings
2019-08-16 10:41:57 +03:00
Bruno Oliveira
eb90f3d1c8
Fix default value of 'enable_assertion_pass_hook'
2019-06-26 17:54:24 -03:00
Victor Maryama
d638da5821
Using ini-file option instead of cmd option.
2019-06-26 18:10:16 +02:00
Victor Maryama
4db5488ed8
Now dependent on command line option.
2019-06-25 19:49:05 +02:00
Victor Maryama
2280f28596
Black formatting.
2019-06-25 10:36:01 +02:00
Victor Maryama
9a89783fbb
Assertion passed hook
2019-06-24 16:09:39 +02:00
Anthony Sottile
a91fe1fedd
pre-commit run pyupgrade --all-files
2019-06-03 12:08:02 -03:00
Anthony Sottile
3f1ec520fc
pre-commit run reorder-python-imports --all-files
2019-06-03 12:08:01 -03:00
Anthony Sottile
5034399d7a
pre-commit run fix-encoding-pragma --all-files
2019-06-03 12:08:01 -03:00
Bruno Oliveira
4d49ba6529
Drop Python 2.7 and 3.4 support
...
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
2019-06-02 14:39:11 -03:00
Anthony Sottile
dc75b6af47
Use fix-encoding-pragma pre-commit hook
2019-05-14 15:56:31 -07:00
Anthony Sottile
2368fbb63c
Apply reorder-python-imports to all files
2018-10-25 00:01:29 -07:00
Ronny Pfannschmidt
eaa882f3d5
switch to src layout
2018-05-26 09:10:38 +02:00