Commit Graph

1483 Commits

Author SHA1 Message Date
Bruno Oliveira 602cd5e21f
Introduce Config.invocation_params (#5564)
Introduce Config.invocation_params
2019-07-10 07:46:34 -03:00
Bruno Oliveira 31738155b5
Remove deprecated features (#5529)
Remove deprecated features
2019-07-09 19:04:06 -03:00
Bruno Oliveira 9db1823707 Improve type-checking in OutcomeException
Fix #5578
2019-07-09 18:26:57 -03:00
David Röthlisberger d5cc0f2a62 changelog for new NUMBERS doctest option 2019-07-08 17:16:35 +01:00
Bruno Oliveira 7a82285b03 Update CHANGELOG 2019-07-06 17:29:35 -03:00
Bruno Oliveira 3e669a262a Introduce Config.invocation_args and Config.invocation_plugins
These attributes can be used to access the unchanged arguments passed
to pytest.main().

The intention is to use these attributes to initialize workers in
the same manner as the master node is initialized in pytest-xdist.
2019-07-05 19:45:23 -03:00
Bruno Oliveira a43ba78d3b Include <testsuites> root tag in generated XML
Fix #5477
2019-07-05 11:29:35 -03:00
Bruno Oliveira bb29f31d22 Preparing release version 5.0.1 2019-07-04 20:01:16 -04:00
Bruno Oliveira 8651d880a0 Handle xfail(strict=True) properly in --step-wise mode
Fix #5547
2019-07-04 20:28:37 -03:00
Miro Hrončok c54cbd63c8 Replace importlib_metadata with importlib.metadata on Python 3.8+
Fixes https://github.com/pytest-dev/pytest/issues/5537
2019-07-04 15:00:10 +02:00
Bruno Oliveira 1db132290f Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix #5523
2019-07-04 14:59:40 +02:00
Anthony Sottile caa08ebd45 Improve quoting in raises match failure message 2019-07-04 05:55:26 -07:00
Bruno Oliveira 0ed7aa2db6 Make 'request' a reserved name for fixtures 2019-06-30 13:31:39 -03:00
Bruno Oliveira c470ade0a5 Remove 'RemovedInPytest4Warning' 2019-06-30 13:31:39 -03:00
Bruno Oliveira 3a17c1b30b Remove 'pytest_logwarning' hook 2019-06-30 13:18:07 -03:00
Bruno Oliveira aa1955de72 Remove 'tmpdir_factory.ensuretemp' 2019-06-30 13:18:07 -03:00
Bruno Oliveira 7e58defc15 Remove 'pytest.config' 2019-06-30 13:18:07 -03:00
Bruno Oliveira 683b2632b4 Remove explicit kwargs handling from raises, warns and ParameterSet.param 2019-06-30 13:18:06 -03:00
Bruno Oliveira 13f7f27fd2 Remove 'message' parameter from pytest.raises 2019-06-30 13:18:06 -03:00
Bruno Oliveira 279733a30b Remove support for 'code as string' from pytest.raises and pytest.warns 2019-06-30 11:40:24 -03:00
Bruno Oliveira be91c4d932 Remove Request.getfuncargvalue 2019-06-30 11:02:46 -03:00
Bruno Oliveira 9021194efd Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.

Fix #5523
2019-06-29 11:15:28 -03:00
Bruno Oliveira d4a76a0b99
doc(plugin_hooks): Improve documentation for writing plugin hoo… (#5517)
doc(plugin_hooks): Improve documentation for writing plugin hooks.
2019-06-29 09:39:49 -03:00
Niklas Meinzer 93a68cdfb4 doc(plugin_hooks): Improve documentation for writing plugin hooks. 2019-06-29 14:02:53 +02:00
Anthony Sottile fd2f320485 Preparing release version 5.0.0 2019-06-28 14:39:53 -07:00
Anthony Sottile 7ee244476a Remove astor and reproduce the original assertion expression 2019-06-28 13:38:52 -07:00
Anthony Sottile 4e723d6750 Fix crash when discovery fails while using `-p no:terminal` 2019-06-27 10:24:29 -07:00
Bruno Oliveira 37fb50a3ed
Features assertion pass hook (#3479)
Features assertion pass hook
2019-06-26 21:14:19 -03:00
Bruno Oliveira 790806e865
Merge pull request #5494 from Zac-HD/funcargnames-to-fixturenames
Deprecate funcargnames alias for fixturenames
2019-06-26 21:13:59 -03:00
Bruno Oliveira 8edf68f3c0 Add a trivial note about astor 2019-06-26 19:21:12 -03:00
Bruno Oliveira 3afee36ebb Improve docs and reference 2019-06-26 19:15:00 -03:00
Victor Maryama 6f851e6cbb Merge remote-tracking branch 'upstream/master' into features-assertion-pass-hook-master
# Conflicts:
#	src/_pytest/assertion/rewrite.py
2019-06-26 18:12:56 +02:00
Anthony Sottile 3f3f3e7a29
Merge pull request #5495 from nicoddemus/blueyed/cmp-bytes
Improve comparison of byte strings (supersedes #5267)
2019-06-25 19:16:24 -07:00
Bruno Oliveira 3f2344e8f7 Show bytes ascii representation instead of numeric value 2019-06-25 20:40:25 -03:00
Daniel Hahler 8c7eb82363 Fix/improve comparison of byte strings
Fixes https://github.com/pytest-dev/pytest/issues/5260.
2019-06-25 20:15:45 -03:00
Zac Hatfield-Dodds ed85c83154 Deprecate funcargnames alias 2019-06-26 08:53:17 +10:00
Bruno Oliveira 019455298b Merge remote-tracking branch 'upstream/features' into merge-features-into-master 2019-06-25 12:07:54 -03:00
Bruno Oliveira 64a6365227
Include pytest version in the cached pyc tags (#5484)
Include pytest version in the cached pyc tags
2019-06-25 12:07:01 -03:00
Zac Hatfield-Dodds d72fb73fa0 Do not allow abbreviated arguments 2019-06-25 13:51:33 +10:00
Bruno Oliveira 37fce6c6e5
Pickup addition positional args passed to _parse_parametrize_ar… (#5483)
Pickup addition positional args passed to _parse_parametrize_args
2019-06-24 22:05:19 -03:00
Kevin J. Foley 95714436a1 Pickup additional positional args passed to _parse_parametrize_args 2019-06-24 20:43:52 -04:00
Bruno Oliveira f43fb13179 Include pytest version in the cached pyc tags
Fix #1671
2019-06-24 20:37:07 -03:00
Bruno Oliveira 3f5b078462
Merge pull request #5441 from nicoddemus/faulthandler-5440
Integrate pytest-faulthandler into the core
2019-06-24 20:01:15 -03:00
Anthony Sottile 4cd08f9b52 Switch from deprecated imp to importlib 2019-06-24 09:48:38 -07:00
Victor Maryama 9a89783fbb Assertion passed hook 2019-06-24 16:09:39 +02:00
Bruno Oliveira a37b902afe Integrate pytest-faulthandler into the core
* Add pytest-faulthandler files unchanged
* Adapt imports and tests
* Add code to skip registration of the external `pytest_faulthandler`
  to avoid conflicts

Fix #5440
2019-06-21 21:02:24 -03:00
Bruno Oliveira b38a4e8e11
Fix stepwise crash when first collected module fails (#5446)
Fix stepwise crash when first collected module fails
2019-06-16 10:43:18 -03:00
Bruno Oliveira 87fc5a5455
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types' (#5452)
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
2019-06-16 10:41:40 -03:00
Bruno Oliveira bbfc8d1501
conversion of exit codes to enum + exposure (#5420)
conversion of exit codes to enum  + exposure
2019-06-16 10:41:18 -03:00
Daniel Hahler cf27af734e
Merge pull request #5404 from Zac-HD/helpful-mock-unwrapper
Emit warning for broken object
2019-06-15 18:54:03 +02:00
Ronny Pfannschmidt 8b3b10b14b pre-commit 2019-06-15 17:41:13 +02:00
Ronny Pfannschmidt 065fa17124 update cangelog to fit review suggestion 2019-06-15 17:03:40 +02:00
Bruno Oliveira 43e8576ca3 Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
When we configure warnings as errors, users see error messages like this:

        def test():
    >       warnings.warn(pytest.PytestWarning("some warning"))
    E       _pytest.warning_types.PytestWarning: some warning

This is a problem because suggests the user should use `_pytest.warning_types.PytestWarning` to configure
their warning filters, which is not nice.

This commit changes the message to:

        def test():
    >       warnings.warn(pytest.PytestWarning("some warning"))
    E       pytest.PytestWarning: some warning
2019-06-15 11:48:34 -03:00
Ronny Pfannschmidt 2bd619ecb0 add changelog 2019-06-15 07:05:18 +02:00
Bruno Oliveira 4cc05a657d Fix --sw crash when first file in cmdline fails to collect
Fix #5444
2019-06-13 16:47:01 -03:00
Bruno Oliveira 52780f39ce Postpone removal of --result-log to pytest 6.0
As we did not provide an alternative yet, it is better to postpone
the actual removal until we have provided a suitable and stable
alternative.

Related to #4488
2019-06-12 08:26:11 -03:00
Zac-HD c5a549b5bb Emit warning for broken object 2019-06-09 22:17:40 +10:00
Bruno Oliveira 9f5c356784
Remove ExceptionInfo.__str__, falling back to __repr__ (#5413)
Remove ExceptionInfo.__str__, falling back to __repr__
2019-06-07 08:48:03 -03:00
Ralph Giles 918268774b
Add `slow` marker in run/skip option example.
The example implementation of a `--runslow` option results in
a `PytestUnknownMarkWarning`. Include registering the custom
mark in the example, based on the documentation in markers.rst.
2019-06-06 10:15:43 -07:00
Bruno Oliveira 65c2a81924 Remove ExceptionInfo.__str__, falling back to __repr__
Fix #5412
2019-06-06 12:20:32 -03:00
Bruno Oliveira 9f8b566ea9
Turn PytestDeprecationWarning into error (#5410)
Turn PytestDeprecationWarning into error
2019-06-05 22:20:14 -03:00
Bruno Oliveira 3656885d0d
Fix verbosity bug in --collect-only (#5391)
Fix verbosity bug in --collect-only
2019-06-05 20:47:59 -03:00
Thomas Hisch 577b0dffe7 Fix verbosity bug in --collect-only 2019-06-05 20:10:16 -03:00
Bruno Oliveira 8f5cb461a8 Turn PytestDeprecationWarning into error
Fix #5402
2019-06-05 19:02:52 -03:00
Anthony Sottile 0f4992c223
Merge pull request #5393 from nicoddemus/unittest-self-5390
item.obj is again a bound method on TestCase function items
2019-06-04 17:48:48 -07:00
Bruno Oliveira 1f8fd421c4 item.obj is again a bound method on TestCase function items
Fix #5390
2019-06-04 20:22:49 -03:00
Dirk Thomas 898e869bcd add changelog file for #5389 2019-06-04 10:55:38 -07:00
Bruno Oliveira 2a3d643bdf
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries (#5315)
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries
2019-06-03 19:30:29 -03:00
Anthony Sottile 230f736fcd Add changelog entries for reverting all() handling 2019-06-03 08:42:03 -07:00
Anthony Sottile 2125d04501 Revert "Fix all() unroll for non-generators/non-list comprehensions (#5360)"
This reverts commit 733f43b02e, reversing
changes made to e4fe41ebb7.
2019-06-03 08:42:03 -07:00
Thomas Hisch ef053193b5 logging: Extend LEVELNAME_FMT_REGEX 2019-06-03 05:53:19 +02:00
Bruno Oliveira acdf30a523 Fix all() unroll for non-generators/non-list comprehensions
Fix #5358
2019-06-02 12:12:14 -03:00
Anthony Sottile cafb13c95f Fix `pytest.mark.parametrize` when the argvalue is an iterator 2019-06-01 15:09:17 -07:00
Anthony Sottile e7cd00ac92 Preparing release version 4.6.0 2019-05-31 23:12:57 -07:00
Anthony Sottile fb3ae5eaa9 Merge remote-tracking branch 'origin/master' into mm 2019-05-30 20:23:38 -07:00
Bruno Oliveira c8d23c206b
logging: Improve formatting of multiline message (#5312)
logging: Improve formatting of multiline message
2019-05-30 21:42:41 -03:00
Victor Maryama 65bd1b8a93 Avoiding looking upwards for parameter argnames when generating fixtureinfo. 2019-05-30 23:42:04 +02:00
Daniel Hahler f013a5e8c1 pytester: use temporary HOME with spawn
Followup to https://github.com/pytest-dev/pytest/issues/4956.
2019-05-30 17:39:44 +02:00
Bruno Oliveira 5cbc06a453 Show test module in the PytestCollectionWarning message
Related to #5330
2019-05-30 08:18:28 -03:00
Daniel Hahler 6765aca0d1 Merge master into features 2019-05-30 06:33:04 +02:00
Bruno Oliveira b10f28949d
Add the junit_log_passing_tests ini flag to skip logging output for passing tests. (#5052)
Add the junit_log_passing_tests ini flag to skip logging output for passing tests.
2019-05-29 20:56:13 -03:00
Daniel Hahler ceb4f3f701 fixup! Fix regression with --lf and non-selected failures 2019-05-29 23:24:52 +02:00
Thomas Hisch ea3ebec117 logging: Improve formatting of multiline message 2019-05-29 23:21:14 +02:00
Thomas Hisch 84569ca4da
Merge pull request #5311 from thisch/coloredcaplog
Use same code for setting up cli/non-cli formatter
2019-05-29 22:18:43 +02:00
Thomas Hisch 31b1c4ca0c
Update changelog/5311.feature.rst
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-05-29 22:00:34 +02:00
Thomas Hisch d4b85da8c7 Use same code for setting up cli/non-cli formatter
A method _create_formatter was introduced that is used for both the
log_cli_formatter and the log_formatter.

Consequences of this commit are:
* Captured logs that are output for each failing test are formatted
  using the ColoredLevelFromatter.
* The formatter used for writing to a file still uses the non-colored
  logging.Formatter class.
2019-05-28 21:30:34 +02:00
Evan Kepner 24c95c78e7
add updated monkeypatch examples 2019-05-27 20:55:15 -04:00
Daniel Hahler e032904413 Merge master into features 2019-05-28 01:46:16 +02:00
Bruno Oliveira 2b9ca34280
Unroll calls to any #5062 (#5103)
Unroll calls to any #5062
2019-05-27 20:17:44 -03:00
Anthony Sottile 13f02af97d Switch to importlib-metadata 2019-05-27 13:24:08 -07:00
Daniel Hahler f2ed796c41 pdb: import pdbcls lazily
Fixes https://github.com/pytest-dev/pytest/issues/2064.
2019-05-26 15:56:38 +02:00
Tomer Keren ddbe733666 Add changelog entry for 5062 2019-05-25 19:34:08 +03:00
Bruno Oliveira b4d75ad31d
Merge pull request #5091 from blueyed/showhelp-ini-options
Improve output of ini options in --help
2019-05-23 21:10:43 -03:00
Daniel Hahler fa8a658458
Merge pull request #4908 from blueyed/pdb-pm-enter-hook
pdb: trigger pytest_enter_pdb hook with post-mortem
2019-05-24 01:50:24 +02:00
David Röthlisberger 84c7fef836
changelog: Fix typo 2019-05-23 16:48:39 +01:00
Daniel Hahler 6c56070df1
Merge pull request #5278 from blueyed/disable-python-plugin
Allow disabling of python plugin
2019-05-23 15:52:19 +02:00
Daniel Hahler b2ce6f3200 Improve output of ini options in --help
Do not cut long help texts, but wrap them the same way as argparse wraps
the other help items.
2019-05-23 09:33:07 +02:00
Daniel Hahler a0ff5deabf pdb: trigger pytest_enter_pdb hook with post-mortem
This is required for pytest-pdb to be called with `--pdb`.

TODO:

- [ ] test
- [ ] pass mode to hook, e.g. "post_mortem" in this case?
2019-05-23 09:09:53 +02:00
Daniel Hahler 97b85a17ae changelog [ci skip] 2019-05-23 08:38:54 +02:00
Akiomi Kamakura a304dbb519 Fix `disable_test_id_escaping_and_forfeit_all_rights_to_community_support` option when using a list of test IDs 2019-05-21 09:48:22 +09:00
Daniel Hahler d19df5efa2 importorskip: display/include ImportError
This can provide useful information, e.g.

> could not import 'pyrepl.readline': curses library not found
2019-05-20 14:13:33 +02:00
Bruno Oliveira e253029ad0 Handle lone surrogate unicode character not being representable in Jython
No tests for this because we don't test with Jython currently.

Fix #5256
2019-05-16 17:59:31 -03:00
Daniel Hahler c8f7e50c47
Merge pull request #5262 from asottile/mode_non_binary
Remove 'b' from sys.stdout.mode
2019-05-15 10:56:36 +02:00
Anthony Sottile 4318698bae Remove 'b' from sys.stdout.mode 2019-05-14 15:00:59 -07:00
Evan Kepner 2ad36b1402
add #5250 changelog entry 2019-05-12 10:08:46 -04:00
Bruno Oliveira 63fe547d9f Preparing release version 4.5.0 2019-05-11 16:35:32 +00:00
Bruno Oliveira 465b2d998a
Further "unknown marks warning" improvements (#5178)
Further "unknown marks warning" improvements
2019-05-11 13:28:10 -03:00
Bruno Oliveira 73bbff2b74 Introduce record_testsuite_property fixture
This exposes the functionality introduced in fa6acdc as a session-scoped fixture.

Plugins that want to remain compatible with the `xunit2`
standard should use this fixture instead of `record_property`.

Fix #5202
2019-05-10 19:44:27 -03:00
Bruno Oliveira 0594dba5ce Remove unused markers and enable --strict-markers 2019-05-09 19:36:39 -03:00
Bruno Oliveira 685ca96c71 Change ``--strict`` to ``--strict-markers``, preserving the old one
Fix #5023
2019-05-09 19:36:38 -03:00
Bruno Oliveira ccf6c3cb46 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2019-05-09 19:22:40 -03:00
Daniel Hahler 73b74c74c9 pdb: only use outcomes.exit via do_quit
Fixes https://github.com/pytest-dev/pytest/issues/5235.
2019-05-09 14:55:55 +02:00
Bruno Oliveira 4d782dc13f Add CHANGELOG for #5239 2019-05-09 09:00:39 -03:00
Daniel Hahler 5eeb5ee960
Merge pull request #5013 from blueyed/short-summary-message
Display message from reprcrash in short test summary
2019-05-08 22:01:04 +02:00
Pulkit Goyal 7e08e09473 logging: improve default logging format (issue5214)
We improve the following things in the logging format:

  * Show module name instead of just the filename
  * show level of logging as the first thing
  * show lineno attached to module:file details

Thanks to @blueyed who suggested this on the github issue.

It's my first contribution and I have added myself to AUTHORS.

I also added to a changelog file.
2019-05-08 21:37:59 +03:00
Bruno Oliveira 3ac43314ee Preparing release version 4.4.2 2019-05-08 12:46:14 -03:00
Romain Chossart 0cf267f187 Add changelog entry for #5229 2019-05-08 16:13:28 +01:00
Bruno Oliveira f339147d12 Add CHANGELOG entry about depending on wcwidth 2019-05-07 19:34:57 -03:00
Bruno Oliveira 6d040370ed Show fixture scopes with ``--fixtures``, except for "function" scope
Fix #5220
2019-05-07 14:32:20 -03:00
Bruno Oliveira 4a2fdce62b
Emit a warning for record_property when used with xunit2 (#5204)
Emit a warning for record_property when used with xunit2
2019-05-05 21:33:31 -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 9f66102869 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2019-05-04 10:47:57 -03:00
DamianSkrzypczak 6e81c3df92 add changelog for issue #5171 fixes 2019-05-02 21:30:03 +02:00
Allan Lewis f050203f5d
Improve help for --runxfail flag
The help for the '--runxfail' flag is somewhat misleading. The default
behaviour is to run tests marked as 'xfail' but to ignore the results. This
flag alters that behaviour by running these tests as if they weren't marked
'xfail', i.e. their results are not ignored.
2019-05-01 10:04:32 +01: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 a3c2ec3c5b Add CHANGELOG for #5182 2019-04-28 11:10:21 -03:00
Bruno Oliveira 915ecb0dac Add CHANGELOG for #5177 2019-04-28 10:47:19 -03: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 4749dca764 changelog [ci skip] 2019-04-18 23:54:20 +02:00
Ilya Konstantinov d67d68f6d3 Eliminate core dependency on 'terminal' plugin 2019-04-17 11:19:19 -07: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
Anthony Sottile 990133f804
Merge pull request #5132 from nicoddemus/merge-master-into-features
Merge master into features
2019-04-15 13:11:33 -07: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
Bruno Oliveira 8d3a5dcd1b Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2019-04-15 14:47:45 -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 006dc30476 Preparing release version 4.4.1 2019-04-15 14:24:17 +00:00
Daniel Hahler 6f0a5789fb Merge master into features 2019-04-14 23:22:21 +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
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 42e60d935a doc/changelog 2019-04-11 11:44:04 +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 12133d4eb7 changelog [ci skip] 2019-04-10 23:15:25 +02:00
Daniel Hahler dde27a2305 changelog [ci skip] 2019-04-10 21:39:51 +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
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 0f965e57a2 changelog, fix branch coverage 2019-04-05 12:12:29 +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 eb5b2e0db5 Support glob argument with ``--cache-show`` 2019-04-04 18:10: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
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 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
Bruno Oliveira 15ea5cef46
Merge pull request #4943 from blueyed/remove-silence_logging_at_shutdown
capture: do not set logging.raiseExceptions = False
2019-04-02 22:46:15 -03:00
Daniel Hahler 08ded2927a capture: do not set logging.raiseExceptions = False
Ref: https://github.com/pytest-dev/pytest/issues/4942
2019-04-02 13:20:39 +02:00
Zac Hatfield-Dodds 9121138a1b Emit warning for unknown marks 2019-04-01 10:40:18 +11:00
Zac-HD bcc08ffe4d More docs on registering marks 2019-03-31 14:22:30 +11:00
Bruno Oliveira 8881b201aa Preparing release version 4.4.0 2019-03-29 20:49:18 +00: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
Gary Tyler 403f556928 Update docs for 'pytest_cmdline_parse' hook to note availability liminations 2019-03-28 19:25:55 -04:00
Bruno Oliveira d8ef86aadf
Merge pull request #4993 from blueyed/stepwise-report
stepwise: report status via pytest_report_collectionfinish
2019-03-28 20:24:18 -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 46d9243eb0 changelog 2019-03-28 11:56:53 +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
Jeong YunWon 8b0b7156d9 Fix glitches of original patch of disable-test-id-escaping 2019-03-28 00:07:28 +09:00
ApaDoctor cf6e2ceafd add ini option to disable string escape for parametrization 2019-03-28 00:07:28 +09: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
Daniel Hahler 538efef1ba logging: close log_file_handler
While it should be closed in logging's shutdown [1], the following would
still issue a ResourceWarning:

```
import logging

log_file_handler = logging.FileHandler("temp.log", mode="w", encoding="UTF-8")

root_logger = logging.getLogger()
root_logger.addHandler(log_file_handler)
root_logger.removeHandler(log_file_handler)
root_logger.error("error")

del log_file_handler
```

It looks like the weakref might get lost for some reason.

See https://github.com/pytest-dev/pytest/pull/4981/commits/92ffe42b45 / #4981
for more information.

1: c1419578a1/Lib/logging/__init__.py (L2107-L2139)
2019-03-26 18:24:19 +01:00
Daniel Hahler 94a2e3dddc stepwise: report status via pytest_report_collectionfinish 2019-03-26 13:20:33 +01: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 b18df936ea changelog 2019-03-26 10:06:53 +01:00
Bruno Oliveira 645774295f Add CHANGELOG 2019-03-25 20:16:59 -03:00
Daniel Hahler 5df45f5b27 Use fixup_namespace_packages also with pytester.syspathinsert 2019-03-22 17:02:26 +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 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