Bruno Oliveira
0e8a8f94f6
Add encoding header to test_terminal.py
2019-05-05 09:14:07 -03:00
Bruno Oliveira
8f23e19bcb
Emit a warning for record_property when used with xunit2
...
"property" elements cannot be children of "testsuite" according to the schema, so it is incompatible with xunit2
Related to #5202
2019-05-05 09:01:13 -03:00
Bruno Oliveira
fc2ad1dbed
Warning subclasses ( #5179 )
...
Warning subclasses
2019-04-29 17:57:49 -03:00
Bruno Oliveira
fb6dad60a0
terminal: use pytest_collection_finish for reporting ( #5113 )
...
terminal: use pytest_collection_finish for reporting
2019-04-29 08:00:48 -03:00
Daniel Hahler
ff5317a7f3
terminal: use pytest_collection_finish for reporting
2019-04-29 05:20:04 +02:00
Bruno Oliveira
08734bdd18
--lf now skips colletion of files without failed tests
...
Fix #5172
2019-04-28 20:23:46 -03:00
Bruno Oliveira
53cd7fd2ea
Introduce new warning subclasses
...
Fix #5177
2019-04-28 10:38:25 -03:00
Daniel Hahler
65133018f3
Terminal plugin is not semi-essential anymore
...
Thanks to https://github.com/pytest-dev/pytest/pull/5138 .
2019-04-27 03:39:00 +02:00
Daniel Hahler
308b733b9d
Revert "Merge pull request #4854 from blueyed/pdb-skip"
...
This reverts commit e88aa957ae
, reversing
changes made to 1410d3dc9a
.
I do not think it warrants an option anymore, and there is a way to
achieve this via `--pdbcls` if needed.
2019-04-27 02:25:38 +02:00
Daniel Hahler
7f519f8ab7
Merge master into features
2019-04-27 00:43:00 +02:00
Nikolay Kondratyev
bc00d0f7db
Fix handle repr error with showlocals and verbose output
2019-04-19 18:54:21 +03:00
Daniel Hahler
e3e57a755b
Merge pull request #5083 from blueyed/capture-_suspended
...
capture: store _state
2019-04-19 17:32:54 +02:00
Daniel Hahler
79d5fc3a0b
Merge pull request #5144 from blueyed/sessionfinish-exitstatus
...
pytest_sessionfinish: preset exitstatus with UsageErrors
2019-04-19 17:30:01 +02:00
Daniel Hahler
f75f7c1925
conftest: use a hookwrapper with sorting faster tests first
2019-04-19 01:23:34 +02:00
Daniel Hahler
698c4e75fd
capture: track current state in _state attributes
...
This is meant for debugging, and making assertions later.
2019-04-19 00:35:15 +02:00
Daniel Hahler
649d23c8a8
pytest_sessionfinish: preset exitstatus with UsageErrors
...
Previously it would be 0. Setting it to the expected outcome
(EXIT_USAGEERROR) here already helps `pytest_sessionfinish` hooks.
2019-04-18 23:18:59 +02:00
Ilya Konstantinov
d67d68f6d3
Eliminate core dependency on 'terminal' plugin
2019-04-17 11:19:19 -07:00
Daniel Hahler
c3178a176d
move test
2019-04-17 15:30:34 +02:00
Daniel Hahler
df1d1105b0
Merge remote-tracking branch 'origin/features' into short-summary-message
...
Conflicts:
src/_pytest/skipping.py
2019-04-17 15:30:19 +02:00
Bruno Oliveira
b64d9402ca
Merge pull request #5108 from blueyed/summary
...
terminal summary: display passes after warnings
2019-04-15 14:49:01 -03:00
Daniel Hahler
ea79eb5c3f
terminal summary: display passes after warnings
...
This displays passes (with output, `-rP`) before the short summary, and
before any other output from other plugins also.
2019-04-15 16:31:42 +02:00
Bruno Oliveira
852ca7ad59
Merge pull request #5114 from blueyed/fixtest
...
test_pytest_exit_returncode: ignore ResourceWarnings
2019-04-15 11:25:16 -03:00
Daniel Hahler
45ba736c81
Merge pull request #5128 from blueyed/mark-is
...
Fix error message with unregistered markers
2019-04-15 16:23:54 +02:00
Daniel Hahler
cc005af47e
Fix error message with unregistered markers
2019-04-15 10:15:37 +02:00
Daniel Hahler
f1f1862b19
Update testing/test_runner.py
2019-04-14 23:26:56 +02:00
Daniel Hahler
6f0a5789fb
Merge master into features
2019-04-14 23:22:21 +02:00
Daniel Hahler
1dd5f088fa
test_pytest_exit_returncode: ignore ResourceWarnings
...
Fixes https://github.com/pytest-dev/pytest/issues/5088 .
2019-04-14 21:55:15 +02:00
Daniel Hahler
8fd5a658eb
monkeypatch.syspath_prepend: invalidate import cache
...
This was done with testdir only, and uses the fixed monkeypatch method
there now.
2019-04-13 16:15:44 +02:00
Anthony Sottile
43e7401c91
Produce a warning when unknown arguments are passed to pytest.param()
2019-04-12 13:00:39 -07:00
Anthony Sottile
da2e092163
pre-commit autoupdate
2019-04-12 04:52:47 -07:00
Bruno Oliveira
19035f4b55
Merge pull request #5068 from blueyed/reportchars
...
Add support for reportchars=A (`-rA`)
2019-04-12 08:13:22 -03:00
Samuel Searles-Bryant
a37d1df089
Show XFail reason as part of JUnitXML message field
...
Fixes #4907
2019-04-11 22:26:05 +01:00
Daniel Hahler
8b2fcf517c
Merge master
2019-04-11 13:28:36 +02:00
Daniel Hahler
b3759372ad
Merge pull request #5082 from blueyed/pytester-raise_on_kwargs
...
pytester: improve/fix kwargs validation
2019-04-11 00:46:18 +02:00
Bruno Oliveira
f5d2b199e2
Merge pull request #5069 from blueyed/cleanup-summary-to-terminal
...
cleanup: move terminal summary code to terminal plugin
2019-04-10 19:32:01 -03:00
Daniel Hahler
148f2fc72c
Fix test_error_during_readouterr: syspathinsert is unused
2019-04-10 21:57:45 +02:00
Daniel Hahler
10fa66e5b5
Merge pull request #5059 from blueyed/pytester-popen-run-stdin
...
pytester: allow passing in stdin to run/popen
2019-04-10 20:32:22 +02:00
Daniel Hahler
fcbfdef11b
Merge pull request #5071 from blueyed/prefer-fast
...
Add a conftest to prefer faster tests
2019-04-10 01:22:24 +02:00
Daniel Hahler
b84f826fc8
test_run_stdin: add sleep
2019-04-10 00:03:49 +02:00
Daniel Hahler
4fb7a91a5e
pdb: add test for --trace with --pdbcls
...
Ensures that https://github.com/pytest-dev/pytest/issues/4111 is fixed,
which happened in 92a2884b
as a byproduct.
2019-04-08 03:49:03 +02:00
Daniel Hahler
06029d11d3
Refactor into TerminalReporter.short_test_summary
2019-04-07 19:49:18 +02:00
Daniel Hahler
4c0ba6017d
Add a conftest to prefer faster tests
...
This uses pytest_collection_modifyitems for pytest's own tests to order
them, preferring faster ones via quick'n'dirty heuristics only for now.
2019-04-07 19:11:17 +02:00
Daniel Hahler
c70ecd49ca
cleanup: move terminal summary code to terminal plugin
...
Fixes https://github.com/pytest-dev/pytest/issues/5067 .
2019-04-07 18:22:04 +02:00
Daniel Hahler
50edab8004
Add tests for reportchars=a
...
Ref: https://github.com/pytest-dev/pytest/issues/5066
2019-04-07 18:05:33 +02:00
Daniel Hahler
b4b9f788af
Support reportchars=A (really all, including passed)
2019-04-07 18:05:33 +02:00
Daniel Hahler
2b1ae8a66d
__tracebackhide__ for check
2019-04-06 15:00:23 +02:00
Daniel Hahler
2ebb69b50a
py2 fixes
2019-04-06 15:00:12 +02:00
Daniel Hahler
4fca86e2af
testdir.popen: use kwargs with defaults for stdout/stderr
2019-04-06 12:13:48 +02:00
Daniel Hahler
9ad00714ba
pytester: allow passing in stdin to run/popen
2019-04-06 12:13:28 +02:00
Daniel Hahler
377888140f
Merge master into features
...
Conflicts:
testing/test_pdb.py
2019-04-05 17:50:32 +02:00
Daniel Hahler
df377b589f
use wcwidth
2019-04-05 17:43:11 +02:00
Daniel Hahler
f599172add
test with 😄 in message
2019-04-05 16:08:11 +02:00
Bruno Oliveira
4f33f46a02
Merge pull request #5026 from blueyed/compare-len-diff
...
Display number of different items with sequence/dict comparisons
2019-04-05 08:53:48 -03:00
Daniel Hahler
159704421e
change separator to hyphen
2019-04-05 12:21:24 +02:00
Daniel Hahler
8011ff5bda
Add _sys_snapshot fixture and use it with more tests
2019-04-05 11:55:23 +02:00
Daniel Hahler
899e74aa14
tests: harden test_immediate_initialiation_and_incremental_are_the_same
2019-04-05 11:55:23 +02:00
Daniel Hahler
66f743c45a
Fix test_conftest when run via pytest-randomly
2019-04-05 11:55:23 +02:00
Jeffrey Rackauckas
da3f836ee3
Added the junit_log_passing_tests ini flag.
2019-04-04 20:26:48 -07:00
Daniel Hahler
37ecca3ba9
factor out _get_line_with_reprcrash_message
2019-04-04 22:13:28 +02:00
Daniel Hahler
3d0ecd03ed
Display message from reprcrash in short test summary
...
This is useful to see common patterns easily, but also for single
failures already.
2019-04-04 18:49:13 +02:00
Daniel Hahler
eb5b2e0db5
Support glob argument with ``--cache-show``
2019-04-04 18:10:39 +02:00
Daniel Hahler
47d92a0d96
Add tests and improve messages
2019-04-04 17:53:39 +02:00
Bruno Oliveira
e04936fc29
Merge pull request #5042 from blueyed/merge-regen-master-into-features
...
Merge master into features (with regen)
2019-04-04 10:44:30 -03:00
Ondřej Súkup
77526f412c
Skip test_source_mtime_long_long on 32bit and lower platforms
2019-04-04 13:14:46 +02:00
Daniel Hahler
0d4636b056
Merge pull request #5034 from blueyed/run-last-failure-report
...
run-last-failure: improve reporting
2019-04-04 00:40:40 +02:00
Daniel Hahler
a65edf6711
Merge pull request #5028 from blueyed/fix-wrap_session-exit-code
...
wrap_session: restore old behavior for initstate=1
2019-04-04 00:39:38 +02:00
Daniel Hahler
757ada2fd2
pdb: try to import --pdbcls in pytest_configure only
...
Fixes https://github.com/pytest-dev/pytest/issues/5039 .
2019-04-03 22:35:18 +02:00
Daniel Hahler
e88aa957ae
Merge pull request #4854 from blueyed/pdb-skip
...
pdb: add option to skip `pdb.set_trace()`
2019-04-03 22:25:38 +02:00
Daniel Hahler
8907fedc79
Merge master into features (with regen branch)
2019-04-03 22:11:00 +02:00
Daniel Hahler
1f5a61e4ef
run-last-failure: improve reporting
2019-04-03 16:27:12 +02:00
Daniel Hahler
d91527599a
pytester: use monkeypatch with Testdir
2019-04-03 15:02:53 +02:00
Daniel Hahler
cc90bcce4c
wrap_session: restore old behavior for initstate=1
2019-04-03 05:09:21 +02:00
Daniel Hahler
8c734dfc2f
Split out list of essential plugins
...
Fixes https://github.com/pytest-dev/pytest/issues/4976 .
2019-04-02 14:39:56 +02:00
Zac-HD
00810b9b2a
Register "issue" mark for self-tests
2019-03-31 14:22:30 +11:00
Bruno Oliveira
278b289f37
Merge pull request #4968 from blueyed/pdb-do_debug-quit
...
pdb: do not raise outcomes.Exit with quit in debug
2019-03-29 16:22:02 -03:00
Daniel Hahler
e7ade066b6
Merge pull request #5011 from blueyed/merge-master-into-features
...
Merge master into features
2019-03-29 18:35:13 +01:00
Daniel Hahler
adebfd0a84
pdb: add option to skip `pdb.set_trace()`
2019-03-29 11:13:38 +01:00
Daniel Hahler
4e931b258d
Merge master into features
2019-03-29 11:05:46 +01:00
Daniel Hahler
4011021823
pdb: do not raise outcomes.Exit with quit in debug
2019-03-29 11:02:34 +01:00
Daniel Hahler
bfda2a0050
setup.cfg: use existing [tool:pytest] (ignoring [pytest])
2019-03-29 10:59:27 +01:00
Bruno Oliveira
6b5cddc48a
Merge pull request #4951 from blueyed/fix-pdb-capfix
...
pdb: handle capturing with fixtures only
2019-03-28 20:34:28 -03:00
Bruno Oliveira
a9fe1e159a
Merge pull request #4965 from nicoddemus/serialization-hooks
...
Serialization hooks
2019-03-28 20:22:19 -03:00
Bruno Oliveira
65c8e8a09e
Rename hooks: to/from_serializable
2019-03-28 13:41:56 -03:00
Daniel Hahler
d53209956b
test_pdb_continue_with_recursive_debug: mock pdb.set_trace
2019-03-28 11:49:01 +01:00
Daniel Hahler
ae067df941
add test_pdb_continue_with_recursive_debug
2019-03-28 11:49:01 +01:00
Daniel Hahler
40718efacc
Fix/revisit do_continue with regard to conditions
2019-03-28 11:49:01 +01:00
Daniel Hahler
d406786a8d
pdb: handle capturing with fixtures only
2019-03-28 11:49:01 +01:00
Daniel Hahler
d17ea7a9c0
tests: ensure cleanup with configs via get_config()
...
Also done in test_pluginmanager, although no resource warnings are
there at least.
Fixes https://github.com/pytest-dev/pytest/issues/4355 .
2019-03-28 00:14:13 +01:00
Daniel Hahler
c92021fc4f
Merge pull request #5003 from blueyed/off
...
Fix off-by-one error with lineno in mark collection error
2019-03-28 00:09:53 +01:00
Daniel Hahler
76c70cbf4c
Fix off-by-one error with lineno in mark collection error
2019-03-27 17:44:52 +01:00
Bruno Oliveira
241b7433cd
Merge pull request #4978 from blueyed/exit-from-from_assertrepr_compare
...
Do not swallow outcomes.Exit in assertrepr_compare
2019-03-26 18:39:13 -03:00
Bruno Oliveira
057c97812b
Merge pull request #4975 from blueyed/verbose-fixes
...
Fix usages of "verbose" option
2019-03-26 18:38:39 -03:00
Bruno Oliveira
02188e399d
Merge pull request #4987 from blueyed/collect-tbstyle-repr_failure
...
CollectError.repr_failure: honor explicit tbstyle option
2019-03-26 18:37:49 -03:00
Bruno Oliveira
9311d822c7
Fix assertion in pytest_report_unserialize
2019-03-26 12:47:31 -03:00
Daniel Hahler
e1ae469504
Merge master into features
2019-03-26 10:23:21 +01:00
Daniel Hahler
0d00be4f4f
Do not swallow outcomes.Exit in assertrepr_compare
2019-03-26 10:20:00 +01:00
Daniel Hahler
23146e7527
Fix usages of "verbose" option
...
With `-qq` `bool(config.getoption("verbose"))` is True; it needs to be
checked for `> 0`.
2019-03-26 10:11:25 +01:00
Daniel Hahler
4148663706
Merge pull request #4979 from blueyed/minor
...
Minor: whitespace, typo, docs
2019-03-26 10:01:13 +01:00
Bruno Oliveira
3e1971eb16
Merge pull request #4994 from blueyed/test_as_errors-subprocess
...
test_as_errors: use subprocess with `-W`
2019-03-25 20:50:15 -03:00
Bruno Oliveira
bcdb86ee7e
Merge pull request #4991 from blueyed/fix-tests
...
Fix pytest's own tests with `-W error::ResourceWarning`
2019-03-25 20:47:51 -03:00
Bruno Oliveira
2d77018d1b
Improve coverage for _report_unserialization_failure
2019-03-25 20:16:59 -03:00
Bruno Oliveira
ceef0af1ae
Improve coverage for to_json() with paths in reports
2019-03-25 20:16:59 -03:00
Bruno Oliveira
e4eec3416a
Note that tests from xdist reference the correct xdist issues
2019-03-25 20:16:59 -03:00
Bruno Oliveira
7b9a414524
Add pytest_report_serialize and pytest_report_unserialize hooks
...
These hooks will be used by pytest-xdist and pytest-subtests to
serialize and customize reports.
2019-03-25 20:16:59 -03:00
Bruno Oliveira
0c63f99016
Add experimental _to_json and _from_json to TestReport and CollectReport
...
This methods were moved from xdist (ca03269).
Our intention is to keep this code closer to the core, given that it
might break easily due to refactorings.
Having it in the core might also allow to improve the code by moving
some responsibility to the "code" objects (ReprEntry, etc) which
are often found in the reports.
Finally pytest-xdist and pytest-subtests can use those functions
instead of coding it themselves.
2019-03-25 20:16:59 -03:00
Daniel Hahler
6eff3069da
Merge pull request #4851 from blueyed/addopts-vv
...
ci: PYTEST_ADDOPTS=-vv
2019-03-25 23:41:33 +01:00
Daniel Hahler
58a14b6b99
Merge pull request #4986 from blueyed/fnmatch_lines-list
...
tests: fnmatch_lines: use list
2019-03-25 23:31:04 +01:00
Daniel Hahler
b53bf44139
Merge pull request #4985 from blueyed/assert-from_current
...
ExceptionInfo.from_current: assert current exception
2019-03-25 23:28:58 +01:00
Daniel Hahler
51f64c2920
Merge pull request #4980 from blueyed/fixup_namespace_packages
...
monkeypatch.syspath_prepend: call fixup_namespace_packages
2019-03-25 23:10:00 +01:00
Daniel Hahler
de44293d59
CollectError.repr_failure: honor explicit tbstyle option
2019-03-24 11:24:19 +01:00
Daniel Hahler
5efe6ab93c
test_log_cli_auto_enable: get stdout once
2019-03-24 11:22:07 +01:00
Daniel Hahler
ce59f42ce1
revisit test_root_logger_affected
2019-03-24 11:21:13 +01:00
Daniel Hahler
7da7b9610c
minor: whitespace
2019-03-24 11:20:24 +01:00
Daniel Hahler
0ea1889265
test_as_errors: use subprocess with `-W`
...
Ref: https://github.com/pytest-dev/pytest/pull/4981
2019-03-24 11:17:55 +01:00
Daniel Hahler
6352cf2374
test_implicit_bad_repr1: harden/cleanup
2019-03-24 11:15:40 +01:00
Daniel Hahler
3127ec737b
Fix pytest's own tests with `-W error::ResourceWarning`
2019-03-24 11:05:00 +01:00
Daniel Hahler
d0f3f26fff
test_collect_capturing: cover captured stderr
2019-03-23 23:17:07 +01:00
Daniel Hahler
08f3b02dfc
tests: fnmatch_lines: use list
...
For strings fnmatch_lines converts it into a Source objects, splitted on
newlines. This is not necessary here, and it is more consistent to use
lists here in the first place.
2019-03-23 11:36:18 +01:00
Daniel Hahler
2d690b83bf
ExceptionInfo.from_current: assert current exception
2019-03-23 00:29:36 +01:00
Daniel Hahler
afa985c135
Revisit coverage in some tests
2019-03-22 17:26:16 +01:00
Daniel Hahler
fd64fa1863
Revisit test_importplugin_error_message
...
Should be more helpful in case of errors than before:
> assert re.match(expected_message, str(excinfo.value))
E _pytest.warning_types.PytestWarning: asserting the value None, please use "assert is None"
https://travis-ci.org/pytest-dev/pytest/jobs/509970576#L208
2019-03-22 17:02:26 +01:00
Daniel Hahler
05d55b86df
tests: minor sys.path cleanup
2019-03-22 16:20:55 +01:00
Daniel Hahler
475119988c
monkeypatch.syspath_prepend: call fixup_namespace_packages
...
Without the patch the test fails as follows:
# Prepending should call fixup_namespace_packages.
monkeypatch.syspath_prepend("world")
> import ns_pkg.world
E ModuleNotFoundError: No module named 'ns_pkg.world'
2019-03-22 15:29:08 +01:00
Daniel Hahler
7a6bcc3639
Add reference to test_cmdline_python_namespace_package
2019-03-22 13:23:44 +01:00
Daniel Hahler
ade773390a
minor: rename inner test
2019-03-22 13:23:44 +01:00
Daniel Hahler
2e7d6a6202
Fix test_assertrewrite in verbose mode
...
Fixes https://github.com/pytest-dev/pytest/issues/4879 .
2019-03-22 13:00:35 +01:00
Daniel Hahler
15d608867d
Merge pull request #4966 from blueyed/fix-preparse
...
config: fix consider_preparse with missing argument to -p
2019-03-21 19:12:57 +01:00
Daniel Hahler
ea2c6b8a88
config: fix consider_preparse with missing argument to -p
...
This is only required after/with 415899d4
- otherwise argparse ensures
there is an argument already.
2019-03-21 17:05:22 +01:00
Daniel Hahler
553951c443
Fix some issues related to "-p no:X" with default_plugins
2019-03-21 17:01:50 +01:00
Daniel Hahler
cc6e5ec345
tests: add test_report_collect_after_half_a_second
...
This is meant for stable coverage with "collecting X item(s)".
2019-03-20 22:13:11 +01:00
Daniel Hahler
7939e5327c
Merge pull request #4957 from blueyed/config-handle-pno-with-default-plugins
...
config: handle `-p no:plugin` with default plugins
2019-03-20 03:32:03 +01:00
Daniel Hahler
c7c120fba6
terminal: handle "capture" option not being available
...
This is the case with `-p no:capture` now.
2019-03-20 03:01:26 +01:00
Daniel Hahler
415899d428
config: handle `-p no:plugin` with default plugins
...
`-p no:capture` should not load its fixtures in the first place.
2019-03-20 02:47:13 +01:00
Daniel Hahler
8dda5613ef
Merge pull request #4956 from blueyed/home2
...
pytester: set HOME only with inline_run/popen
2019-03-20 02:29:29 +01:00
Daniel Hahler
714f2113bb
Merge pull request #4929 from blueyed/fix-_factorytraceback-offset
...
Fix line offsets with `ScopeMismatch` errors
2019-03-20 01:30:58 +01:00
Daniel Hahler
a50b92ea67
pytester: set HOME only with inline_run/popen
...
Ref: https://github.com/pytest-dev/pytest/issues/4955
2019-03-20 01:15:51 +01:00
Daniel Hahler
da81c1e49a
Merge pull request #4950 from blueyed/capture
...
Revisit capturing module: repr, doc fixes, minor
2019-03-20 01:12:22 +01:00
Bruno Oliveira
23ab43233e
Merge pull request #4920 from nicoddemus/subtests-pytest-1367
...
Internal refactorings required for *external* pytest-subtests plugin
2019-03-19 18:57:11 -03:00
Bruno Oliveira
1a119a22d1
Internal refactorings in order to support the new pytest-subtests plugin
...
Related to #1367
2019-03-19 18:20:41 -03:00
Daniel Hahler
920bffbfbb
Revisit _pytest.capture: repr, doc fixes, minor
2019-03-19 01:17:21 +01:00
Daniel Hahler
751c061d9a
Merge master into features
2019-03-19 01:07:10 +01:00
Daniel Hahler
a624b84097
Merge pull request #4941 from blueyed/testdir-home
...
pytester: testdir: set $HOME to tmpdir
2019-03-18 23:02:15 +01:00
Daniel Hahler
c75dd10671
pytester: testdir: set $HOME to tmpdir
...
This avoids loading user configuration, which might interfere with test
results, e.g. a `~/.pdbrc.py` with pdb++.
Also sets USERPROFILE, which will be required with Python 3.8 [1].
1: https://bugs.python.org/issue36264
2019-03-18 20:55:39 +01:00
Daniel Hahler
98981276a0
capture: fix FDCapture.__repr__ without targetfd_save
2019-03-18 02:33:03 +01:00
Daniel Hahler
15fe8c6e90
Handle `-p plug` after `-p no:plug`.
...
This can be used to override a blocked plugin (e.g. in "addopts") from the
command line etc.
2019-03-16 15:58:00 +01:00
Daniel Hahler
5e27ea5528
pytester: LineMatcher: assert Sequence when matching in order
...
This can be helpful when passing a set accidentally.
2019-03-15 23:07:08 +01:00
Bruno Oliveira
33d4c96aa2
Merge pull request #4830 from nicoddemus/warn-on-coroutine
...
Emit a warning when a coroutine test function is encountered
2019-03-15 09:51:34 -03:00
Takafumi Arakaki
fa3cca51e1
Test pytest.skip in doctest
2019-03-15 11:06:57 +09:00
Daniel Hahler
d441fa66fe
Fix line offsets with `ScopeMismatch` errors
...
Fixes https://github.com/pytest-dev/pytest/issues/4928 .
2019-03-15 02:47:33 +01:00
Daniel Hahler
7afe17740f
Merge master into features
2019-03-15 00:52:12 +01:00
Bruno Oliveira
40072b9511
Emit a warning when a async def function is not handled by a plugin
...
Fix #2224
2019-03-14 20:22:23 -03:00
Daniel Hahler
bdac9d3dd0
tests: improve test_pdb_interaction_doctest
...
- ignore pdbrc (might be done in general, but this was the only affected
test)
- fail faster in case of unexpected failure
2019-03-14 19:16:34 +01:00
Daniel Hahler
37158f5303
tests: fix test_pdb_interaction_continue_recursive with pdbpp
2019-03-14 19:16:34 +01:00
Bruno Oliveira
bd70f5c148
Add test for mtime issue in #4903
2019-03-14 10:16:08 -03:00
Miro Hrončok
d32ab6029f
Fix pytest tests invocation with custom PYTHONPATH
...
Fixes https://github.com/pytest-dev/pytest/issues/4913
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2019-03-12 17:31:42 +01:00
Daniel Hahler
76687030f0
Merge branch 'master' into merge-master-into-features
...
Conflicts:
appveyor.yml
setup.py
2019-03-05 19:07:36 +01:00
Daniel Hahler
8481e438bd
ci: revisit coverage reporting
...
This brings coverage back that got missing with 9dcd6f2
.
Continuation of #4839 / #4846 .
2019-03-05 13:34:46 +01:00
Daniel Hahler
83558a0ba3
tests: make test_crash_on_closing_tmpfile_py27 more reliable
...
It fails reliable for me now without the fix from 9517c3a2a
.
Ref: #2370
2019-03-04 15:04:55 +01:00
Bruno Oliveira
23ea04f910
Merge pull request #4860 from nicoddemus/getfixturevalue-cleanup-1895
...
getfixturevalue does not correctly declare dependency with the calling fixture
2019-03-03 15:56:45 -03:00
Daniel Hahler
c334adc78f
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com>
2019-03-03 11:20:00 -03:00
Bruno Oliveira
0deb7b1696
Do not show "inifile:" string if there's no configuration file
2019-03-02 11:45:08 -03:00
Bruno Oliveira
53b8aa065c
Show testpaths option in the header if it has been used for collection
...
Fix #4875
2019-03-02 11:35:32 -03:00
Bruno Oliveira
6a2d122a50
Remove code debugging leftovers
2019-03-02 09:56:15 -03:00
Bruno Oliveira
d97473e551
Add test and CHANGELOG for #1895
2019-03-02 09:39:30 -03:00
Bruno Oliveira
525639eaa0
Rename fixtures testing file to be consistent with the module name
2019-03-02 09:37:30 -03:00
Bruno Oliveira
7dceabfcb2
Ensure fixtures obtained with getfixturevalue() are finalized in the correct order
...
Fix #1895
2019-03-02 09:36:16 -03:00
Daniel Hahler
4290cacb86
Merge pull request #4864 from blueyed/isort-cfg
...
Add config for isort
2019-03-01 18:44:56 +01:00
Daniel Hahler
f7a3e001f7
pdb: allow for --pdbclass=mod:attr.class
2019-03-01 15:20:04 +01:00
Daniel Hahler
0d31e852b1
Run isort
2019-03-01 14:24:18 +01:00
Daniel Hahler
a51dc0c7ce
Validate type with writing to captured output like without
...
Fixes https://github.com/pytest-dev/pytest/issues/4861 .
2019-03-01 14:03:51 +01:00
Daniel Hahler
a868a9ac13
pdb: validate --pdbcls option
2019-02-28 18:11:58 +01:00
Daniel Hahler
ccab469a0c
Fix test_argcomplete: use python -m pytest
...
Previously it was not run with a) xdist ("-c"), and b) "python -m
pytest" ("…/pytest.py", not executable).
2019-02-27 16:52:46 +01:00
Bruno Oliveira
a0207274f4
-p option now can be used to early-load plugins by entry-point name
...
Fixes #4718
2019-02-24 13:20:17 -03:00
Bruno Oliveira
a68f4fd2b9
Fix test failures after pluggy 1.8 release
...
pluggy now calls iter_entry_points with different arguments, and tests
which mocked that call need to be updated accordingly.
2019-02-22 18:58:54 -03:00
Bruno Oliveira
5b35241470
Merge pull request #4812 from mitzkia/logging_from_runtest_logreport
...
Logging: Make pytest_runtest_logreport() hook available for logging
2019-02-22 18:47:06 -03:00
Andras Mitzki
b26b731498
Logging: Make pytest_runtest_logreport() available for logging
...
Signed-off-by: Andras Mitzki <andras.mitzki@balabit.com>
2019-02-22 05:14:44 +01:00
Bruno Oliveira
9cb504ca9a
Add same environments to Azure as have in AppVeyor, except py37-freeze
...
py37-freeze will be tackled in https://github.com/pytest-dev/pytest/issues/4807
2019-02-18 17:23:39 -03:00
Bruno Oliveira
f0a9f9042f
Merge pull request #4805 from nicoddemus/release-4.3.0
...
Release 4.3.0
2019-02-18 17:18:50 -03:00
Anthony Sottile
5505826db9
Fix python3.8 / pypy failures
2019-02-16 11:23:23 -08:00
Bruno Oliveira
0395996756
Merge remote-tracking branch 'upstream/master' into release-4.3.0
2019-02-16 14:06:51 +00:00
Bruno Oliveira
986dd84375
LoggingPlugin: Support to customize log_file from hook ( #4752 )
...
LoggingPlugin: Support to customize log_file from hook
2019-02-16 12:01:21 -02:00
Daniel Hahler
6fb7269979
terminal: write_fspath_result: work around py bug
2019-02-15 17:47:00 +01:00
Andras Mitzki
e3824d23bc
LoggingPlugin: Expose setting log_file_handler
...
- This patch allows to set log_file (path) from hook
Signed-off-by: Thomas Hisch
Signed-off-by: Andras Mitzki <andras.mitzki@balabit.com>
2019-02-15 16:05:10 +01:00
Daniel Hahler
407d4a0cf0
collect: python: fix `AssertionError` with broken symlinks
...
Fixes https://github.com/pytest-dev/pytest/issues/4782 .
2019-02-14 00:18:14 +01:00
Daniel Hahler
7b91952645
Merge master into features
...
Conflicts:
tox.ini
2019-02-13 17:58:16 +01:00
Anthony Sottile
f672b7e39e
Merge pull request #4773 from nicoddemus/remove-py27-py34-deprecation-warning
...
Remove py27 py34 deprecation warning
2019-02-12 21:42:07 -05:00
Bruno Oliveira
e20e376881
Merge pull request #4347 from blueyed/pdb-recursive-capture
...
pdbpp: fix capturing with recursive debugging
2019-02-12 16:53:14 -02:00
Bruno Oliveira
b41632e9a8
Revert "Show deprecation message when running under Python 2.7 and 3.4"
...
This reverts commit eb92e57509
.
2019-02-12 10:39:25 -02:00
Daniel Hahler
f13935da53
Display --help/--version with ArgumentErrors
2019-02-11 15:49:48 +01:00
Daniel Hahler
61b9246afe
Fix/improve handling of pkg init and test file via args
...
Ref: https://github.com/pytest-dev/pytest/issues/4344#issuecomment-441095934
2019-02-11 15:04:24 +01:00
Daniel Hahler
9feb4941f4
pdb: fix capturing with recursive debugging and pdb++
...
While I think that pdb++ should be fixed in this regard (by using
`pdb.Pdb`, and not `self.__class__` maybe), this ensures that custom
debuggers like this are working.
2019-02-11 14:52:20 +01:00
Daniel Hahler
ed01dc6567
Merge pull request #4652 from blueyed/RunResult-repr
...
Add __repr__ for RunResult
2019-02-09 01:26:24 +01:00
Daniel Hahler
fc8800c71f
Merge pull request #4722 from fetzerch/ignore_wildcards
...
Add ability to use globs when using --ignore
2019-02-09 00:11:04 +01:00
Daniel Hahler
9bcbf552d6
Add __repr__ for RunResult
2019-02-08 23:41:20 +01:00
Bruno Oliveira
32c6d4f603
Merge pull request #4738 from pstradomski/master
...
Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source.
2019-02-08 19:57:14 -02:00
Daniel Hahler
9c03196e79
Merge master into features
2019-02-08 22:02:29 +01:00
Daniel Hahler
64e8185ff7
Merge master into features
2019-02-08 20:09:09 +01:00
Daniel Hahler
913a2da6e5
Fix handling of collect_ignore from parent conftest
...
`_collectfile` should be called on files only.
Fixes https://github.com/pytest-dev/pytest/issues/4592 .
2019-02-08 18:46:43 +01:00
Anthony Sottile
4c7ddb8d9b
Fix `parametrize(... ids=<function>)` when the function returns non-strings.
2019-02-07 12:25:59 -08:00
Paweł Stradomski
59e6fb94b5
Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source.
2019-02-07 02:05:22 +01:00