Commit Graph

10552 Commits

Author SHA1 Message Date
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
Bruno Oliveira 63c4802be0
minor: clarify help with reportchars (#5475)
minor: clarify help with reportchars
2019-06-24 19:59:15 -03:00
Anthony Sottile a24933b0a6
Merge pull request #5481 from asottile/minor_py3_cleanup
Use new raise syntax in one case
2019-06-24 12:06:53 -07:00
Anthony Sottile 380ca8f880 Use new raise syntax in one case 2019-06-24 11:24:03 -07:00
Anthony Sottile 61dcb84f0d
Merge pull request #5468 from asottile/switch_importlib_to_imp
Switch from deprecated imp to importlib
2019-06-24 11:22:01 -07:00
Anthony Sottile 4cd08f9b52 Switch from deprecated imp to importlib 2019-06-24 09:48:38 -07:00
Victor Maryama 52e695b329 Removed debug code. 2019-06-24 17:47:48 +02:00
Victor Maryama 9a89783fbb Assertion passed hook 2019-06-24 16:09:39 +02:00
Daniel Hahler 01a094cc43 minor: clarify help with reportchars
`-ra` / `-rA` will include "w" also.  This does not explicitly mention
it (allowing for change the behavior), but makes it a) clearer that "w"
is a recognized reportchar, and b) less confusing that `-ra
--disable-warnings` still displays them.
2019-06-24 06:07:52 +02:00
Bruno Oliveira 3ce31b6370 Change pytest-faulthandler for simplification
* The --no-faulthandler option is not necessary given that we can use
  `-p no:faulthandler`.

* The `--faulthandler-timeout` command-line option has become an ini
  option, for the reasons described in
  https://github.com/pytest-dev/pytest-faulthandler/issues/34 and
  users can still set it from the command-line.

Fix pytest-dev/pytest-faulthandler#34
2019-06-22 19:22:43 -03:00
Bruno Oliveira 3d01dd3adf
Update cache.rst (#5465)
Update cache.rst
2019-06-21 21:12:30 -03: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
curiousjazz77 12b76b6261
Update cache.rst 2019-06-21 15:48:59 -07:00
Bruno Oliveira b713460cc7
fix typos in the resolution of #5125 (#5458)
fix typos in the resolution of #5125
2019-06-17 16:55:26 -03:00
Ronny Pfannschmidt 0627d92df2 fix typos in the resolution of #5125 2019-06-17 20:35:23 +02: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 689ce112e7
Small cleanups on _pytest.compat (#5451)
Small cleanups on _pytest.compat
2019-06-16 10:42:07 -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
Bruno Oliveira ab6ed381ac Improve ExitCode docstring 2019-06-15 20:53:46 -03:00
Ronny Pfannschmidt 1cfea5f1b3 add ExitCode reference in usage 2019-06-15 21:41:55 +02: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 103d6146b0 document exitcode members 2019-06-15 17:18:21 +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
Bruno Oliveira d8fa434d39 Remove Python 2-only workaround 2019-06-15 10:45:16 -03:00
Bruno Oliveira 177af032d2 Remove unused/unneeded code 2019-06-15 10:45:16 -03:00
Bruno Oliveira 355eb5adfb Small cleanups on _pytest.compat
Small improvements and cleanups
2019-06-15 10:06:37 -03:00
Ronny Pfannschmidt 2bd619ecb0 add changelog 2019-06-15 07:05:18 +02:00
Ronny Pfannschmidt 2b92fee1c3 initial conversion of exit codes to enum 2019-06-15 06:48:00 +02:00
Anthony Sottile 240828d912
Merge pull request #5448 from nicoddemus/add-hooks
Remove broken/unused PytestPluginManager.addhooks
2019-06-14 21:45:11 -07:00
Bruno Oliveira c94e9b6145
Fix test docstring 2019-06-13 23:10:13 -03:00
Bruno Oliveira 7513d87b15 Remove broken/unused PytestPluginManager.addhooks
The function has been deprecated for ages and
the PLUGIN_MANAGER_ADDHOOKS constant doesn't even exist since 3.0.

Because the function is clearly broken, this change doesn't even
require a CHANGELOG.
2019-06-13 19:55:13 -03:00
Bruno Oliveira bc345ac980 Remove handling of collection errors by --sw
Since then pytest itself adopted the behavior of interrupting
the test session on collection errors, so --sw no longer needs
to handle this.

The --sw behavior seems have been implemented when pytest
would continue execution even if there were collection errors.
2019-06-13 17:19:36 -03: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
Thomas Grainger ad15efc7ea
add test for stepwise attribute error Refs: #5444 2019-06-13 12:39:49 +01:00
Bruno Oliveira e3dcf1f39d
Merge pull request #5442 from patriksevallius/master
Add missing 'e' to test_mod(e).
2019-06-13 08:23:53 -03:00
patriksevallius 701d0351a6
Add missing 'e' to test_mod(e). 2019-06-13 06:01:30 +02:00
Bruno Oliveira bad7ab721a
Minor: tox: coverage: use -m with coverage-report (#5427)
Minor:  tox: coverage: use -m with coverage-report
2019-06-12 19:44:15 -03:00
Anthony Sottile ede8b87560
Merge pull request #5438 from nicoddemus/result-log-deprecation
Postpone removal of --result-log to pytest 6.0
2019-06-12 10:45:02 -07: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
Bruno Oliveira d637d1b2ac
Merge pull request #5435 from asottile/release-4.6.3 (#5436)
Merge pull request #5435 from asottile/release-4.6.3
2019-06-11 21:24:45 -03:00
Anthony Sottile 47447963b7
Merge pull request #5437 from asottile/reenable_pypy3
re-enable pypy3
2019-06-11 12:21:53 -07:00
Anthony Sottile f586d627b3 re-enable pypy3 now that importlib-metadata 0.18 is released 2019-06-11 10:54:16 -07:00
Anthony Sottile 108fad1ac0 Revert "ci: Travis: remove pypy3 job for now"
This reverts commit 47022b36cb.
2019-06-11 10:53:32 -07:00
Anthony Sottile 18c2ff6625 Merge pull request #5435 from asottile/release-4.6.3
Preparing release version 4.6.3
2019-06-11 09:59:05 -07:00
Zac-HD c5a549b5bb Emit warning for broken object 2019-06-09 22:17:40 +10:00
Daniel Hahler 75cda6de53 tox: coverage: use -m with coverage-report 2019-06-09 12:51:32 +02:00