Daniel Hahler
3dbc61dd80
tests: test_code: improve/clarify imports
2020-01-29 19:44:37 +01:00
Daniel Hahler
b42938421e
Merge pull request #6610 from blueyed/tests-move-test_getfslineno
...
tests: move test_getfslineno
2020-01-29 19:43:28 +01:00
Daniel Hahler
87fecce77b
Merge pull request #6600 from blueyed/harden-test_teardown_many_verbose
...
tests: harden test_teardown_many_verbose
2020-01-29 18:56:10 +01:00
Anthony Sottile
595d62bc3e
Merge pull request #6607 from asottile/empty_string_parametrize_nodeid
...
Fix node ids which contain a parametrized empty-string variable
2020-01-29 08:42:04 -08:00
Daniel Hahler
55e5817570
Merge master into features
2020-01-29 03:07:35 +01:00
Daniel Hahler
3f4b8d3aec
test_code: improve coverage
2020-01-29 02:54:12 +01:00
Daniel Hahler
a3f482ceba
tests: move test_getfslineno
...
It should be in `test_code` when testing `_pytest._code.getfslineno`,
not to be confused with `_pytest._code.source.getfslineno`.
Adds an extra assert (via https://github.com/pytest-dev/pytest/pull/6590 ).
2020-01-29 01:26:10 +01:00
Daniel Hahler
3ccf2a5e61
Merge pull request #6524 from blueyed/reportchars-default
...
terminal: default to `fE` with `-r` (reportchars)
2020-01-29 01:00:41 +01:00
Daniel Hahler
8e1d59a8dd
Merge pull request #6579 from blueyed/pytester-makefile-joins-abspath
...
pytester: test for _makefile joining an absolute path
2020-01-29 00:58:43 +01:00
Bruno Oliveira
d282424589
Fix unguarded `==` comparison in fixtures. ( #6541 )
...
Fix unguarded `==` comparison in fixtures.
2020-01-28 20:54:14 -03:00
Daniel Hahler
ddaa5d88ac
terminal: default to `fE` with `-r` (reportchars)
...
Adds handling of `N` to reset `reportchars`, which can be used to get
the old behavior (`-rN`), and also allows for an alternative to
`--disable-warnings` (https://github.com/pytest-dev/pytest/issues/5066 ),
since `w` was included by default (without `--disable-warnings`).
Fixes https://github.com/pytest-dev/pytest/issues/6454
2020-01-29 00:33:15 +01:00
Anthony Sottile
abd5fc80e8
Fix node ids which contain a parametrized empty-string variable
2020-01-28 13:27:54 -08:00
Holger Kohr
80d4dd6f0b
Replace `==` with `is` for comparison of cache keys
...
Closes #6497
2020-01-28 18:05:53 -03:00
Daniel Hahler
1cf9e68dbc
tests: cover absolute path handling in _compute_fixture_value
2020-01-28 18:53:28 +01:00
Daniel Hahler
b01e379428
tests: harden test_teardown_many_verbose
2020-01-28 16:37:18 +01:00
Daniel Hahler
30922ee694
Merge master into features
2020-01-28 01:40:14 +01:00
Daniel Hahler
ad0f4f0ac0
tests: cover collect_by_name with non-existing
2020-01-28 00:41:46 +01:00
Daniel Hahler
20b66e60c0
Merge pull request #6566 from blueyed/rm-encodedfile-writelines
...
Fix `EncodedFile.writelines`
2020-01-27 22:58:31 +01:00
Daniel Hahler
c2980eb80f
pytester: test for _makefile joining an absolute path
...
Ref: https://github.com/pytest-dev/pytest/pull/6578#discussion_r371035867
2020-01-27 01:00:55 +01:00
Daniel Hahler
40758e86ca
tests: add test_via_exec
...
Via https://github.com/pytest-dev/pytest/issues/6574 .
2020-01-26 23:04:18 +01:00
Daniel Hahler
d678d380cb
typing: tests: tmpfile
2020-01-25 19:21:19 +01:00
Daniel Hahler
3f8f395210
typing: EncodedFile
2020-01-25 19:20:48 +01:00
Daniel Hahler
778d4364fa
tests: test_collection_collect_only_live_logging: allow for 1s
...
Might be slow on CI.
Ref: https://github.com/pytest-dev/pytest/pull/6570/checks?check_run_id=408752475#step:6:109
2020-01-25 18:14:49 +01:00
Daniel Hahler
039d582b52
Fix `EncodedFile.writelines`
...
This is implemented by the underlying stream already, which additionally
checks if the stream is not closed, and calls `write` per line.
Ref/via: https://github.com/pytest-dev/pytest/pull/6558#issuecomment-578210807
2020-01-25 18:06:50 +01:00
Daniel Hahler
510be29db8
Merge pull request #6534 from blueyed/test_plugin_loading_order
...
tests: add test_plugin_loading_order
2020-01-25 16:20:06 +01:00
Daniel Hahler
1e3bc1814d
typing for test_summary_stats
2020-01-25 15:09:02 +01:00
Daniel Hahler
57512aa997
_get_main_color: no yellow ("boring") for non-last item
...
- refactor _get_main_color/build_summary_stats_line
- factor out property _is_last_item; test_summary_stats: tr._is_last_item
- _write_progress_information_filling_space: remove color arg
- use setter for stats, handling main color
- _get_main_color: skip cache for last item
- Handle random order in test for py35.
2020-01-25 15:09:02 +01:00
Daniel Hahler
c51173d426
Merge master into features
2020-01-25 14:18:02 +01:00
Ran Benita
a76bc64c54
Merge pull request #6547 from bluetech/session-initialparts
...
Refactor Session._initialparts to have a more explicit type
2020-01-25 14:30:26 +02:00
Ran Benita
dd5c2b22bd
Refactor Session._initialparts to have a more explicit type
...
Previously, _initialparts was a list whose first item was a
`py.path.local` and the rest were `str`s. This is not something that
mypy is capable of modeling. The type `List[Union[str, py.path.local]]`
is too broad and would require asserts for every access.
Instead, make each item a `Tuple[py.path.local, List[str]]`. This way
the structure is clear and the types are accurate.
To make sure any users who might have been accessing this (private)
field will not break silently, change the name to _initial_parts.
2020-01-25 13:57:49 +02:00
Daniel Hahler
6f2943c7b3
Merge pull request #6558 from gavento/patch-1
...
Make EncodedFile.write() return the return value from inner write()
2020-01-25 11:04:12 +01:00
Tomáš Gavenčiak
5e15c86cc6
Fix EncodedFile.write return value
...
Make EncodedFile, used for captured output streams, method .write return
the number of characters written. Add test for captured stderr write.
Fixes #6557 .
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-25 10:36:23 +01:00
Daniel Hahler
09bdbffbde
Merge master into features
...
Conflicts:
src/_pytest/_code/code.py
src/_pytest/main.py
2020-01-24 23:44:50 +01:00
Daniel Hahler
09ab5fd7e9
Merge pull request #6529 from blueyed/fix-test_repr_traceback_with_invalid_cwd
...
tests: fix test_repr_traceback_with_invalid_cwd
2020-01-24 23:41:31 +01:00
Daniel Hahler
192d3adda3
tests: add test_fixture_arg_ordering
...
This is a regression test for part of
https://github.com/pytest-dev/pytest/issues/6492 , testing one of the
fixes in https://github.com/pytest-dev/pytest/pull/6551 .
2020-01-24 17:48:08 -03:00
Daniel Hahler
79ae86cc3f
tests: fix test_repr_traceback_with_invalid_cwd
...
This never worked as expected (since a912d3745
), and only py38-windows
triggered the mocked `os.getcwd` unintentionally, via `inspect`.
2020-01-24 12:52:12 +01:00
Daniel Hahler
03bc8aba4e
config: typing for create_terminal_writer, re-export TerminalWriter
...
This also imports `TerminalWriter` explicitly via `_pytest._io`,
allowing for easier extending / replacing it.
2020-01-23 14:09:37 +01:00
Daniel Hahler
6b13379f37
Merge pull request #6521 from blueyed/harden-nose-raises
...
tests: improve test for `nose.raises`
2020-01-23 13:42:14 +01:00
Daniel Hahler
00097df5cd
tests: add test_plugin_loading_order
...
Ref: https://github.com/pytest-dev/pytest/pull/6443
2020-01-23 11:57:12 +01:00
Daniel Hahler
e7444bbd5e
tests: remove unnecessary `-rw` option
...
Warnings are enabled by default, which is tested by `test_getreportopt`.
2020-01-23 11:37:19 +01:00
Daniel Hahler
252eae5bc8
tests: fix/harden test_record_property
...
`-rv` is not a recognized reportchar. Probably `-v` was meant, but is
not necessary to check that there are no warnings.
Followup to 2018cf12b
(https://github.com/pytest-dev/pytest/pull/3360 ).
2020-01-23 10:49:59 +01:00
Daniel Hahler
1350c601dc
Node.location: handle str with _node_location_to_relpath
2020-01-23 10:45:31 +01:00
Daniel Hahler
8fa57c8384
tests: improve test for `nose.raises`
...
This should probably get transferred into a `pytest.fail` really, but
tests/documents the current behavior.
2020-01-23 10:45:26 +01:00
Daniel Hahler
aca1723d45
Merge master into features
2020-01-22 19:18:13 +01:00
Daniel Hahler
85df6bbe26
Merge pull request #6536 from blueyed/fix-test_cwd_snapshot
...
tests: fix test_cwd_snapshot
2020-01-22 16:46:04 +01:00
Daniel Hahler
d878d9d4d5
tests: use NotImplementedError with uncovered code
2020-01-22 15:38:12 +01:00
Bruno Oliveira
93b74d28d2
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
* src/_pytest/_code/code.py
* src/_pytest/main.py
* testing/python/metafunc.py
* testing/test_parseopt.py
* testing/test_pytester.py
2020-01-22 11:03:45 -03:00
Daniel Hahler
b8787b8732
tests: fix test_cwd_snapshot
...
Without restoring the cwd, successive tests might fail to parse the
config (via `_pytest.config._prepareconfig()`, for when `--lsof` is
used).
And it is good practice to restore the cwd in any case anyway.
2020-01-22 14:34:11 +01:00
Daniel Hahler
8f5fd537d8
--cache-clear: add test for keeping non-supporting files
...
Ref: https://github.com/pytest-dev/pytest/pull/6296
2020-01-21 22:16:56 +01:00
Ran Benita
fb99b5c66e
Revert "Fix type errors after adding types to the `py` dependency"
...
This reverts commit 930a158a6a
.
Regression test from Bruno Oliveira.
2020-01-20 23:44:56 +02:00
Bruno Oliveira
cdaa9c06e1
Revert "fixtures register finalizers with all fixtures before t… ( #6496 )
...
Revert "fixtures register finalizers with all fixtures before them in the stack"
2020-01-20 13:49:00 -03:00
Ran Benita
3392be37e1
Fix check_untyped_defs in test_runner
2020-01-19 20:01:07 +02:00
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
930a158a6a
Fix type errors after adding types to the `py` dependency
2020-01-19 14:48:24 +02: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
5c445b05e7
typing: py.io.TerminalWriter for tw arguments
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
38fc208205
tests: terminal: harden/improve test_color_yes
2020-01-18 15:49:59 +01:00
Daniel Hahler
7a626921c0
[features] tests: fix test_crash_on_closing_tmpfile_py27
...
(cherry picked from commit 4f0eec2022
)
2020-01-18 14:52:18 +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
cc7f294cfe
Revert "fixtures register finalizers with all fixtures before them in the stack"
...
This reverts commit 99180939fe
.
2020-01-17 12:55:57 -03: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
1667cf3350
Merge pull request #6384 from pv/showlocals-short
...
Make --showlocals work together with --tb=short
Fixes https://github.com/pytest-dev/pytest/issues/494
Ref: https://github.com/pytest-dev/pytest/issues/1715
2020-01-16 22:04:14 +01:00
Daniel Hahler
5049e25a6a
tests: cleanup unused fixtures
2020-01-16 21:12:48 +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
83813bf515
Merge master into features
...
Conflicts:
.github/workflows/main.yml
2020-01-16 19:45:52 +01:00
Daniel Hahler
118cb3d3be
Fix test_config: wrong assertions, lint, unused fixtures
2020-01-16 19:27:46 +01:00
Jakub Mitoraj
ab6406b42e
Update junit_logging with no,log,system-out,system-err,out-err,all
2020-01-16 08:14:46 +01:00
Chris NeJame
99180939fe
fixtures register finalizers with all fixtures before them in the stack
2020-01-15 11:00:42 -05:00
Ronny Pfannschmidt
8ba0b7bc2a
fix #6341 - disallow session/config in Node.from_parent
2020-01-15 13:00:46 +01:00
Daniel Hahler
6f7a95c32e
tests: cover safe_getattr
2020-01-15 11:20:00 +01:00
Daniel Hahler
f5844449a8
Merge pull request #6442 from blueyed/rP
...
terminal: summary_passes: handle teardown sections
2020-01-15 03:02:09 +01:00
Bruno Oliveira
b9c136b809
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 .
2020-01-14 18:31:21 -03:00
Pauli Virtanen
fd1691a2b3
Make --showlocals work together with --tb=short
...
Enable showing local variables when asked to do so in the short
traceback mode.
Fixes #494
2020-01-14 21:30:58 +02:00
Bruno Oliveira
e9d9f71374
Merge remote-tracking branch 'upstream/master' into mm
2020-01-14 09:17:52 -03:00
Daniel Hahler
f0c7f21312
Remove "pragma: no cover" comments
2020-01-14 09:15:36 +01:00
Daniel Hahler
8eec42f040
Merge pull request #6455 from blueyed/mypy-master
...
master: update mypy 0.740 -> 0.761
2020-01-14 08:56:51 +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
Daniel Hahler
117072d64c
typing: fix _pytest.config.findpaths.determine_setup
2020-01-13 11:45:20 +01:00
Daniel Hahler
a136111dcc
tests: test_xfail_handling: use sys.dont_write_bytecode
2020-01-11 23:05:12 +01:00
Daniel Hahler
61d04d3084
terminal: summary_passes: handle teardown sections
...
Fixes https://github.com/pytest-dev/pytest/issues/2780 .
2020-01-11 21:58:19 +01:00
Daniel Hahler
1356d20e90
Merge master into features
2020-01-10 05:20:41 +01:00
Daniel Hahler
1e28cb855d
Merge pull request #6425 from blueyed/xfail-yellow
...
terminal: use "yellow" with any "xpassed" tests
2020-01-09 23:22:58 +01:00
Bruno Oliveira
29db2da9a7
tmpdir_factory.mktemp now fails given absolute and non-normaliz… ( #6323 )
...
tmpdir_factory.mktemp now fails given absolute and non-normalized paths.
2020-01-09 19:10:03 -03:00
Bruno Oliveira
5b295ec68e
Merge remote-tracking branch 'upstream/features' into gftea/features
2020-01-09 18:41:47 -03:00
Daniel Hahler
13baab746d
terminal: use "yellow" with any "xpassed" tests
...
Closes https://github.com/pytest-dev/pytest/issues/449 .
2020-01-09 22:20:41 +01:00
Daniel Hahler
2d2c67d7c0
cacheprovider: pytest_collection_modifyitems: copy items
2020-01-09 21:48:54 +01:00
Bruno Oliveira
356d865ad7
Use concurrent.futures for fidelity to the original report
...
As requested in review
2020-01-07 12:45:18 -03:00
Bruno Oliveira
0e00069340
Fix serialization of 'None' reprcrashes
...
Tracebacks coming from remote processes crated by the multiprocess module
will contain "RemoteTracebacks" which don't have a 'reprcrash' attribute
Fix #5971
2020-01-06 22:04:38 -03:00
Bruno Oliveira
12f74a28fa
Revert "Remove unused _pytest.code.Source.isparseable function"
...
This reverts commit c627ac4e59
.
2020-01-05 14:12:40 -03:00
Bruno Oliveira
c627ac4e59
Remove unused _pytest.code.Source.isparseable function
...
Besides unused, it uses the (deprecated in Python 3.9) parser module
Fix #6404
2020-01-05 12:33:12 -03:00
Ran Benita
4848bbdf9a
Update mypy 0.750 -> 0.761
...
This fixes some type: ignores due to typeshed update.
Newer mypy seem to ignore unannotated functions better, so add a few
minor annotations so that existing correct type:ignores make sense.
2020-01-01 15:22:16 +02:00
Daniel Hahler
1c0242dec1
Fix `RunResult.parseoutcomes` (follow-up to #6353 )
2019-12-30 17:08:52 +01:00
Bruno Oliveira
8077168387
pytester: quick fix error introduced in #5990 ( #6353 )
...
pytester: quick fix error introduced in #5990
2019-12-27 13:28:11 -03:00
Alexandre Mulatinho
dc7bf518b3
pytester: quick fix error introduced in #5990
...
- added a test to check this condition
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
2019-12-18 16:36:24 -03:00
Bruno Oliveira
75493f78bf
Merge master into features ( #6346 )
...
Merge master into features
2019-12-16 21:57:26 -03:00
Bruno Oliveira
c487cf9dd5
Deprecate no print logs ( #6333 )
...
Deprecate no print logs
2019-12-16 19:01:16 -03:00
Vinay Calastry
afbaee7649
Deprecate --no-print-logs option
2019-12-14 16:46:30 -08:00
marc
d42f5a41a5
delete inspect.getargspect() as is deprecated since Python 3.0
2019-12-14 19:52:17 +01:00
Bruno Oliveira
853889e5db
Merge remote-tracking branch 'upstream/master' into mm
2019-12-14 10:45:44 -03:00
Bruno Oliveira
66c1a120ba
Bugfix 5430 pass logs to junit report ( #6274 )
...
Bugfix 5430 pass logs to junit report
2019-12-12 09:35:25 -03:00
gftea
226f0c48bf
fix #5686 , mktemp now fails given absolute and non-normalized paths.
2019-12-12 13:00:23 +01:00
Bruno Oliveira
fa51a26743
Make -r letters "s" and "S" aliases
...
Similar reasons as the previous commit
2019-12-12 07:48:07 -03:00
Bruno Oliveira
59067ad33d
Make -r letters "f" and "F" aliases
...
As far as the output is concerned, they are both identical so it doesn't
make sense to have both.
setup, teardown, and collect failures are already reported as "errors", "E".
2019-12-12 07:43:37 -03:00
Bruno Oliveira
cbb2f9541b
Merge pull request #6316 from cb109/make-keyword-expression-matching-case-insensitive
...
Make keyword expression matching case-insensitive
2019-12-12 06:47:59 -03:00
cmachalo
e13ad22364
Include new --capture-mode=tee-sys option
...
Fix #4597
2019-12-09 13:05:23 -03:00
Christoph Buelter
a326fa22c6
Add a failing test to ensure not everything matches by accident
2019-12-05 17:02:48 +01:00
Christoph Buelter
e24b6b0388
Change -k EXPRESSION matching to be case-insensitive
2019-12-05 14:03:10 +01:00
Bruno Oliveira
c7f9fda42d
Fix assertion rewriting module detection for egg dists
...
Fix #6301
2019-12-04 15:30:45 -03:00
Bruno Oliveira
985ac09048
Merge master into features ( #6312 )
...
Merge master into features
2019-12-03 13:36:58 -03:00
Bruno Oliveira
59f95b7f59
Merge remote-tracking branch 'upstream/master' into mm
2019-12-03 11:07:34 -03:00
Bruno Oliveira
41b7b109e9
Merge branch 'features' into unittest-debug
2019-12-03 10:52:53 -03:00
Bruno Oliveira
172b82875a
Ensure cache supporting files still exist after --cache-clear
...
Fix #6290
2019-12-01 10:36:47 -03:00
Ronny Pfannschmidt
8feeb09398
fixes #5065
2019-11-27 11:25:23 +01:00
Anthony Sottile
209d99102d
Merge pull request #6234 from asottile/remove_none_warning
...
Revert "A warning is now issued when assertions are made for `None`"
2019-11-26 13:04:42 -08:00
Daniel Hahler
a1219ab8fc
pytester: use no colors with inline runs by default
...
Sets `PY_COLORS=0` in the environment by default, which is used by pylib.
Via https://github.com/blueyed/pytest/pull/58
(initially cherry picked from commit f153ad33d10)
2019-11-25 23:48:11 +01:00
Claudio Madotto
b66dc80008
Fix for issue #5430 - junit-xml: logs are not passed to junit report for tests failed not in a teardown phase
2019-11-25 12:59:03 +01:00
Ronny Pfannschmidt
c99c7d0f95
deprecate direct node construction and introduce Node.from_parent
2019-11-23 21:54:11 +01:00
Bruno Oliveira
886b8d27c6
Merge pull request #5984 from phloose/acceptance-tests_pytest-dev/pytest/#4445
...
Add acceptance tests for "config warnings" stacklevel (#4445 )
2019-11-22 19:45:41 -03:00
Daniel Hahler
b0ebcfb785
pytester: remove special handling of env during inner runs
...
Closes https://github.com/pytest-dev/pytest/issues/6213 .
2019-11-22 21:50:31 +01:00
Nikolay Kondratyev
5e097970df
Fix line detection for properties in doctest tests
...
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-11-22 23:50:20 +03:00
Philipp Loose
a02310a140
Add stacklevel tests for warnings, 'location' to pytest_warning_captured
...
Resolves #4445 and #5928 (thanks to allanlewis)
Add CHANGELOG for location parameter
2019-11-22 17:50:00 -03:00
Daniel Hahler
2344982d7f
main: wrap_session: handle exit.Exception with notify_exception
...
Fixes https://github.com/pytest-dev/pytest/issues/6257 .
Via https://github.com/blueyed/pytest/pull/132 .
2019-11-21 22:50:33 +01:00
Daniel Hahler
df0c652333
Merge master into features
2019-11-21 20:31:52 +01:00
Mark Dickinson
64eb9ea670
Modify test for new expected behaviour
2019-11-21 11:50:40 +00:00
Ran Benita
5820c5c5a6
Merge pull request #6241 from bluetech/type-annotations-9
...
Add type annotations to _pytest.config.argparsing and corresponding Config code
2019-11-21 13:33:13 +02:00
Daniel Hahler
ed012c808a
Merge pull request #6174 from blueyed/ids-iter
...
parametrized: ids: support generator/iterator
2019-11-21 00:37:25 +01:00
Daniel Hahler
6b75a7733b
Merge pull request #6247 from blueyed/collecterror-fulltrace
...
Respect --fulltrace with collection errors
2019-11-21 00:27:23 +01:00
Daniel Hahler
2d449e95e4
Respect --fulltrace with collection errors
2019-11-20 23:35:33 +01:00
Ran Benita
dac16cd9e5
Add type annotations to _pytest.config.argparsing and corresponding Config code
2019-11-20 22:02:27 +02:00
Daniel Hahler
2c941b5d13
parametrized: ids: support generator/iterator
...
Fixes https://github.com/pytest-dev/pytest/issues/759
- Adjust test_parametrized_ids_invalid_type, create list to convert tuples
Ref: https://github.com/pytest-dev/pytest/issues/1857#issuecomment-552922498
- Changelog for int to str conversion
Ref: https://github.com/pytest-dev/pytest/issues/1857#issuecomment-552932952
2019-11-20 19:02:17 +01:00
Daniel Hahler
ccb3ef3b33
testing/python/metafunc.py: import _idval once
2019-11-20 18:02:30 +01:00
Ran Benita
51f9cd0e02
argparsing: remove "map_long_option" Action attribute support
...
This feature was added in commit
007a77c2ba
, but was never used in pytest
itself. A GitHub code search doesn't find any users either (only pytest
repo copies). It seems safe to clean up.
2019-11-20 17:09:24 +02:00
Daniel Hahler
2228ccbfb4
pytester: reset log output in _match_lines ( #70 )
...
This is necessary for when using e.g. `no_fnmatch_line` after it.
Factor it out into `_fail`.
(cherry picked from commit aade7ed0045ba32557ef8565cbab28a2c91053a7)
Ref: https://github.com/pytest-dev/pytest/pull/5914#issuecomment-549182242
2019-11-20 05:24:18 +01:00
Bruno Oliveira
5b3867fd65
Release 5.3.0 ( #6233 )
...
Release 5.3.0
2019-11-19 18:49:14 -03:00
Anthony Sottile
faea273c93
Revert "A warning is now issued when assertions are made for `None`"
2019-11-19 08:24:08 -08:00
Bruno Oliveira
21622d0df4
Merge remote-tracking branch 'upstream/master' into release-5.3.0
2019-11-19 12:42:11 -03:00
Daniel Hahler
4ad61cbcf6
Improve check for misspelling of parametrize
...
- there is no need to do this with `--strict-markers`
- it can be done when looking up marks, instead of for every generated
test
2019-11-19 16:05:52 +01:00
Anthony Sottile
63a23d876c
Remove check for os.symlink, always there in py3+
2019-11-18 16:01:44 -08:00
Anthony Sottile
eeeb19626b
Merge pull request #6202 from linw1995/fix_getmodpath
...
Fix incorrect result of getmodpath method.
2019-11-18 15:14:52 -08:00
Bruno Oliveira
89eeefbbaf
Merge pull request #6192 from nicoddemus/remove-reportlog-6180
...
Remove report_log in favor of pytest-reportlog
2019-11-18 17:58:37 -03:00
Daniel Hahler
2ad2fbc9a2
Metafunc: remove hack for DefinitionMock
...
Done initially in 99015bfc8
.
2019-11-18 18:19:34 +01:00
林玮
5d5f480979
Hardening an existing test for demonstrating this change.
2019-11-18 23:46:38 +08:00
JoshKarpel
1e3be8ada4
fix whitespace issues in tests for #2049
2019-11-17 17:14:17 -06:00
JoshKarpel
9e759010d9
resolve #2049
2019-11-17 16:45:42 -06:00
Anthony Sottile
a2d48332fc
Merge pull request #6201 from asottile/mm
...
Merge master into features
2019-11-17 11:30:51 -08:00