Ran Benita
3d2680b31b
Fix type of pytest.warns, and fix check_untyped_defs in test_recwarn
...
The expected_warning is optional.
2020-01-19 19:39:14 +02:00
Ran Benita
0b603156b9
Fix check_untyped_defs errors in test_pytester
2020-01-19 19:39:14 +02:00
Ran Benita
0c247be769
Add a few missing type annotations in _pytest._code
...
These are more "dirty" than the previous batch (that's why they were
left out). The trouble is that `compile` can return either a code object
or an AST depending on a flag, so we need to add an overload to make the
common case Union free. But it's still worthwhile.
2020-01-19 19:39:14 +02:00
Ran Benita
3e6f0f34ff
Cleanup unhelpful alias _AST_FLAG
...
Also replace one direct call to `compile` with this flag with the
equivalent wrapper `ast.parse`. This function can have a more precise
type.
2020-01-19 19:19:34 +02:00
Ran Benita
4fb9cc3bf0
Merge pull request #6511 from bluetech/py-typed-fixes
...
Fix type errors after adding types to the `py` dependency
2020-01-19 15:23:14 +02:00
Ran Benita
930a158a6a
Fix type errors after adding types to the `py` dependency
2020-01-19 14:48:24 +02:00
Daniel Hahler
d347a30656
Merge pull request #6510 from blueyed/typing-fixes
...
typing: fix some "incompatible types in assignment" with py
2020-01-19 13:01:35 +01:00
Daniel Hahler
32b62f770f
Merge pull request #6509 from blueyed/typing-minor
...
typing: minor improvements
2020-01-19 11:33:41 +01:00
Daniel Hahler
aaae43e0ba
typing: fix some "incompatible types in assignment" with py
2020-01-19 11:32:45 +01:00
Daniel Hahler
1a75a3c08e
Merge pull request #6482 from blueyed/fix-_TracebackStyle
...
typing: fix _TracebackStyle
2020-01-19 11:24:05 +01:00
Daniel Hahler
09e9a01df3
typing: fix _TracebackStyle: add "line"
2020-01-19 11:22:47 +01:00
Daniel Hahler
4b974b051d
Merge pull request #6507 from blueyed/fix-test_excinfo
...
tests: test_excinfo: remove unused pytest_version_info
2020-01-19 11:21:46 +01:00
Daniel Hahler
5c445b05e7
typing: py.io.TerminalWriter for tw arguments
2020-01-19 11:21:16 +01:00
Daniel Hahler
4e0dbe92dd
Node.name: str
2020-01-19 11:21:16 +01:00
Daniel Hahler
956389fa8c
Session._fixturemanager
2020-01-19 11:21:16 +01:00
Daniel Hahler
61f985f3c7
tests: test_excinfo: remove unused pytest_version_info
...
This might fail unnecessarily with a (wrong) determined version of e.g.
"4.7.dev307+ge98176cf5" (no patch version).
Ref: https://github.com/pytest-dev/pytest/pull/6506
2020-01-19 08:11:13 +01:00
Daniel Hahler
e98176cf50
Merge pull request #6501 from blueyed/test_color_yes
...
tests: terminal: harden test_color_yes
2020-01-18 16:11:27 +01:00
Daniel Hahler
38fc208205
tests: terminal: harden/improve test_color_yes
2020-01-18 15:49:59 +01:00
Daniel Hahler
ac41f36a02
Merge pull request #6500 from blueyed/ci-travis
...
ci: Travis: remove non-coverage jobs
2020-01-18 14:53:03 +01:00
Daniel Hahler
59bc6efbf2
Merge pull request #6498 from blueyed/test_terminal_colors
...
test_terminal: improve color handling
2020-01-18 13:36:42 +01:00
Daniel Hahler
a7292a0544
ci: Travis: remove non-coverage jobs
...
This helps with regard to slowness until
https://github.com/pytest-dev/pytest/pull/6470 is resolved.
2020-01-18 13:35:44 +01:00
Daniel Hahler
1971033051
Merge pull request #6499 from blueyed/fix-ci
...
tests: fix test_crash_on_closing_tmpfile_py27
2020-01-18 13:35:11 +01:00
Daniel Hahler
d4d04e7f25
test_terminal: improve color handling
2020-01-18 13:16:27 +01:00
Daniel Hahler
4f0eec2022
tests: fix test_crash_on_closing_tmpfile_py27
2020-01-18 13:15:40 +01:00
Bruno Oliveira
e1298faef9
Merge pull request #6481 from nicoddemus/release-5.3.3
...
Release 5.3.3
2020-01-17 08:07:57 -03:00
Daniel Hahler
e211d6fe2a
Merge pull request #6488 from blueyed/typing-fix-reportinfo
...
typing: Node.reportinfo: might return py.path.local via fspath
2020-01-17 11:52:01 +01:00
Bruno Oliveira
544b4a14d5
Fix Hugo van Kemenade name in release announcement
...
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-01-17 07:18:57 -03:00
Daniel Hahler
4a42deee7e
typing: Node.reportinfo: might return py.path.local via fspath
2020-01-17 11:05:46 +01:00
Daniel Hahler
2cce026766
Merge pull request #6476 from blueyed/fix-test_config
...
Fix test_config: wrong assertions, lint, unused fixtures
2020-01-17 10:31:41 +01:00
Daniel Hahler
e16cb2fdd0
Merge pull request #6444 from blueyed/fix-test_xfail_handling
...
tests: test_xfail_handling: use sys.dont_write_bytecode
2020-01-17 10:28:23 +01:00
Daniel Hahler
dcb94d8f31
Merge pull request #6485 from blueyed/lint-fix-f999
...
scripts/release.py: lint: fix F999
2020-01-17 09:13:04 +01:00
Daniel Hahler
19f66cb824
Merge pull request #6434 from blueyed/pytester-typing-spawn
...
pytester: typing for `spawn`/`spawn_pytest`
2020-01-17 06:57:40 +01:00
Daniel Hahler
36944157f8
pytester: typing for `spawn`/`spawn_pytest`
2020-01-17 05:58:25 +01:00
Daniel Hahler
2cfee583db
scripts/release.py: lint: fix F999
2020-01-17 05:54:17 +01:00
Bruno Oliveira
56dc301c50
Preparing release version 5.3.3
2020-01-16 18:55:41 -05:00
Bruno Oliveira
aa05334984
Remove broken link for user @jgsonesen
2020-01-16 18:51:33 -05:00
Bruno Oliveira
4806878a7f
Drop deploy from Travis in favor of GitHub actions ( #6480 )
...
Drop deploy from Travis in favor of GitHub actions
2020-01-16 18:34:44 -03:00
Bruno Oliveira
d1d7e5d41b
Drop deploy from Travis in favor of GitHub actions
...
GitHub actions already should deploy.
This is a stop gap while we figure out why coverage dropped
when removing Travis builds in #6470
2020-01-16 18:12:47 -03:00
Daniel Hahler
5b0e255e85
Merge pull request #6465 from blueyed/doc-rootdir
...
doc: revisit section about rootdir
2020-01-16 21:55:12 +01:00
Daniel Hahler
f0fdafeddc
Merge pull request #6477 from blueyed/tests-cleanup-unused-fixtures
...
tests: cleanup unused fixtures
2020-01-16 21:53:56 +01:00
Daniel Hahler
5049e25a6a
tests: cleanup unused fixtures
2020-01-16 21:12:48 +01:00
Daniel Hahler
d36c712bb0
Merge pull request #6479 from blueyed/tests-fix-master
...
[master] Use a dummy RemoteTraceback for test in Python 3.5 Windows
2020-01-16 21:12:04 +01:00
Bruno Oliveira
7a0d1b387d
Use a dummy RemoteTraceback for test in Python 3.5 Windows
...
Somehow in Python 3.5 on Windows this test fails with:
File "c:\hostedtoolcache\windows\python\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
overlapped=True)
OSError: [WinError 6] The handle is invalid
This only happens in this platform and Python version, decided to use
a dummy traceback as originally done in #6412 .
(cherry picked from commit b9c136b809
)
2020-01-16 20:03:16 +01:00
Daniel Hahler
749752d440
Merge pull request #6435 from blueyed/type_checking
...
Use TYPE_CHECKING instead of False
2020-01-16 19:45:00 +01:00
Daniel Hahler
118cb3d3be
Fix test_config: wrong assertions, lint, unused fixtures
2020-01-16 19:27:46 +01:00
Bruno Oliveira
b91c721262
ci: github actions: only deploy pytest-dev/pytest ( #6474 )
...
ci: github actions: only deploy pytest-dev/pytest
2020-01-16 12:48:29 -03:00
Daniel Hahler
4630e2725e
Use `TYPE_CHECKING` instead of `False`
...
This allows for e.g. Jedi to infer types (it checks the name).
It was only used to support Python 3.5.0/3.5.1, where this is is not
available in the `typing` module.
Ref: https://github.com/davidhalter/jedi/issues/1472
Uses `TYPE_CHECKING = False` in `_pytest.outcomes` to avoid having to
work around circular import.
2020-01-16 16:11:39 +01:00
Daniel Hahler
ea31649062
ci: github actions: only deploy pytest-dev/pytest
2020-01-16 13:57:46 +01:00
Bruno Oliveira
715f56dfbc
Fixtures now register finalizers with all fixtures before them… ( #6438 )
...
Fixtures now register finalizers with all fixtures before them in the stack
2020-01-16 07:33:55 -03:00
Chris NeJame
99180939fe
fixtures register finalizers with all fixtures before them in the stack
2020-01-15 11:00:42 -05:00