Daniel Hahler
d35d09f82d
unittest: handle outcomes.Exit
...
This is required for pytest to stop when using "quit" in pdb, and should
get honored/handled in general.
2019-07-20 07:11:49 +02:00
Daniel Hahler
f0feb6c83a
fixup! tox.ini: clean up filterwarnings
2019-07-20 01:54:04 +02:00
Daniel Hahler
dcbb9c1f5a
tox.ini: clean up filterwarnings
...
- path.local/path.readlines is not used anymore
- enhance doc for "invalid escape sequence" filter
2019-07-20 01:24:04 +02:00
Anthony Sottile
c05fcc8641
Merge pull request #5615 from bluetech/type-annotations-2
...
Improve mypy setup + a few minor type fixes and removals
2019-07-19 06:48:24 -07:00
Florian Bruhin
c98e7aed94
Merge pull request #5628 from pytest-dev/leipzig-training-info-1
...
Add info about open training in Leipzig
2019-07-19 14:57:47 +02:00
Oliver Bestwalter
c0231ae780
Add info about open training in Leipzig
2019-07-18 21:06:53 +02:00
Ran Benita
675e9507d8
Don't accept bytes message in pytest.{fail,xfail,skip}
...
It seems to have been added in #1439 to fix #1178 .
This was only relevant for Python 2 where it was tempting to use str (==
bytes) literals instead of unicode literals. In Python 3, it is unlikely
that anyone passes bytes to these functions.
2019-07-17 22:39:10 +03:00
Ran Benita
0b532fda76
Remove unnecessary checks from SetupState
...
Since 4622c28ffd
, _finalizers cannot
contain Nones or tuples, so these checks are not longer needed.
2019-07-17 22:39:10 +03:00
Ran Benita
7d1c697c30
Remove a no-longer-needed check if enum is available
...
Not needed since 4d49ba6529
.
2019-07-17 22:39:10 +03:00
Ran Benita
65aee1e0c8
Allow bytes for OutcomeException(msg=...)
...
It's __repr__ explicitly handles it so allow it.
2019-07-17 22:39:10 +03:00
Ran Benita
8d413c1926
Allow tuple of exceptions in ExceptionInfo.errisinstance
...
isinstance() accepts it and some code does pass a tuple.
Fixup for commit 55a570e513
.
2019-07-17 22:39:10 +03:00
Ran Benita
104f8fc836
Update mypy from 0.711 to 0.720
...
Release notes: http://mypy-lang.blogspot.com/2019/07/mypy-0720-released.html
2019-07-17 22:39:10 +03:00
Bruno Oliveira
157515f3c5
Fix/Remove broken links ( #5613 )
...
Fix/Remove broken links
2019-07-17 13:52:05 -03:00
Bruno Oliveira
183750fa86
CSS changes to the API reference ( #5609 )
...
CSS changes to the API reference
2019-07-17 06:24:31 -03:00
Ran Benita
fd8f92d0e7
Run mypy on src/ and testing/ together
...
This makes testing/ actually pick up the pytest imports -- otherwise
they are opaque and we don't actually test the types.
A single run is also a bit faster and simpler. The original reason why
we split it is no longer relevant (we fixed the problems).
2019-07-16 23:29:02 +03:00
Steffen Schroeder
1e34734f8f
Fixed link to Python Classifiers
2019-07-16 21:56:04 +02:00
Steffen Schroeder
7c2e843358
Fixed link to correct anchor of Python's -w postion
2019-07-16 21:56:04 +02:00
Steffen Schroeder
79414164c2
Fixed broken links in adopt.rst
2019-07-16 21:56:03 +02:00
Steffen Schroeder
0cca7f831a
Fixed broken links and non-existing anchors in release announcements
2019-07-16 21:56:03 +02:00
Steffen Schroeder
1f4ae789b8
Change link to "Where do Google's flaky tests come from?"
...
Although it's available, linkchecker complained about it.
It was changed to the permanent redirect.
2019-07-16 21:56:03 +02:00
Steffen Schroeder
3f46315a9d
Remove link to non-existing anchor
2019-07-16 21:56:03 +02:00
Steffen Schroeder
e03b8b9e95
Update/Fix links to using projects
2019-07-16 21:56:03 +02:00
Steffen Schroeder
eb7f950e20
Fixed broken link to virtualenv
2019-07-16 21:56:03 +02:00
Steffen Schroeder
848b735a06
Fixed links to non existing GitHub users and py
2019-07-16 21:56:03 +02:00
Steffen Schroeder
7337cce332
Fixed links were content was from 'writing_plugins' to 'reference'
2019-07-16 21:56:02 +02:00
Steffen Schroeder
7a5c0a01bc
Fixed links were content was moved to 'historical'
2019-07-16 21:56:02 +02:00
Ran Benita
faf222f8fb
Merge pull request #5593 from bluetech/type-annotations-1
...
Type-annotate pytest.{exit,skip,fail,xfail,importorskip,warns,raises}
2019-07-16 22:38:20 +03:00
Ran Benita
9258fd1296
Merge pull request #5603 from bluetech/saferepr-simplify
...
Simplify SafeRepr a bit
2019-07-16 22:37:02 +03:00
Thomas Grainger
7440cece59
Merge pull request #5589 from graingert/fixture-yield-exit-stack
...
de-emphasize request.addfinalizer Fixes #5587
2019-07-16 18:33:59 +01:00
Anthony Sottile
f1332872a6
Merge pull request #5611 from mxr/patch-1
...
Remove language_version specification in black hooks
2019-07-16 10:15:28 -07:00
Bruno Oliveira
ac12245f5f
Merge pull request #5612 from The-Compiler/new-trainings-2
...
Remove Europython training
2019-07-16 14:00:04 -03:00
Florian Bruhin
d9eab12ee0
Remove Europython training
2019-07-16 15:03:54 +02:00
Max R
2e756d698b
Remove language_version specification in black hooks
...
Resolves #3840
2019-07-16 08:32:24 -04:00
Bruno Oliveira
15e235c63e
Remove obsolete "importorskip('unittest.mock')" calls ( #5608 )
...
Remove obsolete "importorskip('unittest.mock')" calls
2019-07-16 04:41:58 -03:00
Bruno Oliveira
65c23017c7
Update test_getfuncargnames_patching to work with modern mock
2019-07-15 12:23:59 -03:00
Tim Hoffmann
bb7608c56f
Change section titles in docs
2019-07-15 16:25:33 +02:00
Bruno Oliveira
8a3f40996a
Remove obsolete "importorskip('unittest.mock')" calls
2019-07-15 11:18:05 -03:00
Tim Hoffmann
6f1d358a0c
Fix some ReST indentation issues in docstrings
2019-07-15 16:16:44 +02:00
Tim Hoffmann
3ad315bcee
Improve CSS layout of API reference
2019-07-15 16:15:59 +02:00
Ran Benita
129600d698
saferepr: Avoid indirect function calls
...
The DRY savings they provide are rather small, while they make it harder
to type-check, and IMO harder to understand.
2019-07-15 17:07:58 +03:00
Thomas Grainger
a96710dd8a
demonstrate ExitStack assuming connect returns a context manager
2019-07-15 14:05:19 +01:00
Bruno Oliveira
54e08b729f
More CSS fine-tuning ( #5604 )
...
More CSS fine-tuning
2019-07-15 09:42:18 -03:00
Tim Hoffmann
01606315aa
More CSS fine-tuning
2019-07-15 13:40:30 +02:00
Bruno Oliveira
8f2f3bb1fa
Improve CSS layout ( #5602 )
...
Improve CSS layout
2019-07-14 19:02:58 -03:00
Bruno Oliveira
499fda2349
Various cleanups in src/_pytest/python.py ( #5599 )
...
Various cleanups in src/_pytest/python.py
2019-07-14 19:00:35 -03:00
Ran Benita
c7aacc96bb
saferepr: Remove unused setting of max_other
...
max_other is used by the superclass repr_instance, but we override it
and use maxsize instead.
2019-07-14 22:50:14 +03:00
Ran Benita
0394ebffee
saferepr: Use an __init__ instead of setting attributes after construction
...
This will be easier to type-check, and also somewhat clearer.
2019-07-14 22:50:14 +03:00
Ran Benita
0225be53a2
saferepr: Remove dead SafeRepr.repr_unicode
...
This function is not called anywhere directly, and cannot be called by
the dynamic `repr_<type>()` dispatch mechanism because unicode is no
longer a type in Python 3.
2019-07-14 22:13:57 +03:00
Tim Hoffmann
da5add1294
Improve CSS layout
2019-07-14 18:58:07 +02:00
Ran Benita
11f1f79222
Allow creating ExceptionInfo from existing exc_info for better typing
...
This way the ExceptionInfo generic parameter can be inferred from the
passed-in exc_info. See for example the replaced cast().
2019-07-14 14:28:24 +03:00