Commit Graph

9276 Commits

Author SHA1 Message Date
Daniel Hahler 8a0ed7e2b3
Revisit changelog entry [ci skip] 2018-12-05 19:14:41 +01:00
Tomer Keren 8fd60483ef Don't insert warnings when not in a module 2018-12-05 19:49:54 +02:00
Tomer Keren 7a7ad0c120 Shorten docstring for warn_about_none_ast 2018-12-05 17:47:34 +02:00
Tomer Keren 41031fce2f Address code review 2018-12-05 17:18:57 +02:00
Tomer Keren e1e4b226c6 👌 Address code review
Edited the changelog for extra clarity, and to fire off auto-formatting

Oddly enough, keeping `filename='{filename!r}'` caused an error while
collecting tests, but getting rid of the single ticks fixed it
Hopefully closes #3191
2018-12-05 10:52:12 +02:00
Bruno Oliveira 26d27df6fc Improve changelog message 2018-12-05 10:41:30 +02:00
Tomer Keren 3e6f1fa2db Simplify warning creation by using ast.parse
in py2 it's a ast.Name where in py3 it's a ast.NamedConstant

Fixes namespace by using import from
2018-12-05 10:42:05 +02:00
Tomer Keren aaf7f7fcca Update changelog 2018-12-05 10:41:30 +02:00
Tomer Keren e0c2ab1901 Fix tests not to assert a function that already asserts
Maybe there should be a warning about that too?
2018-12-05 10:41:30 +02:00
Tomer Keren 59a11b6a5d Check for 'assert None' and warn appropriately
🐛Fix warn ast bugs

🐛Fix inner-ast imports by using importFrom

Alternetavly ast_call_helper could be retooled to use ast.attribute(...)
2018-12-05 10:41:42 +02:00
Tomer Keren 9fc9b2926f Fix tests and add aditional cases
As requested by review.

👌 Address code review for tests
2018-12-05 10:41:30 +02:00
Tomer Keren 1654b77ca0 [#3191] Set up tests to confirm warnings 2018-12-05 10:41:18 +02:00
Anthony Sottile 5db46d2087
Merge pull request #4498 from asottile/deprecate_pytest_config
Deprecate pytest.config
2018-12-03 11:10:15 -08:00
Anthony Sottile b88c3f8f82 Deprecate pytest.config 2018-12-03 09:01:42 -08:00
Anthony Sottile 4a3c8e22d7
Merge pull request #4491 from nicoddemus/removal-links
Add links to the deprecations docs for the "removal" changelog entries
2018-12-01 21:05:32 -08:00
Bruno Oliveira a131f0acf6
Merge pull request #4490 from nicoddemus/remove-cached-setup-add-call
Remove cached_setup and Metafunc.addcall
2018-12-01 18:44:51 -02:00
Bruno Oliveira 4ffa13728d Add links to the deprecations docs for the "removal" changelog entries 2018-12-01 17:33:48 -02:00
Bruno Oliveira 44b74c8c25
Merge pull request #4447 from nicoddemus/remove-result-log
Change resultlog deprecation to PytestDeprecatedWarning
2018-12-01 17:26:17 -02:00
Bruno Oliveira 40b85d7ee8 Remove Metafunc.addcall
Fix #3083
2018-12-01 16:41:59 -02:00
Bruno Oliveira 090f7ff449 Remove request.cached_setup
Fix #4489
2018-12-01 15:59:44 -02:00
Bruno Oliveira b05061dcd2 Change deprecation type of --result-log to PytestDeprecationWarning
It was decided to deprecate this on a later date (see discussion in #4447)
2018-12-01 14:29:50 -02:00
Bruno Oliveira 06dc6e3490
Merge pull request #4446 from nicoddemus/update-deprecations-docs
Update deprecations.rst now that we have removed a few features
2018-12-01 14:22:19 -02:00
Bruno Oliveira 63f38de38e Merge remote-tracking branch 'upstream/features' into update-deprecations-docs 2018-12-01 14:16:20 -02:00
Bruno Oliveira e0ba1cbf8d
Merge pull request #4299 from RonnyPfannschmidt/callinfo-sanity
refactor callinfo to simplify ctor magic
2018-11-30 14:07:40 -02:00
Ronny Pfannschmidt 847eacea19 refactor CallInfo constructor magic into named constructor 2018-11-30 13:21:54 +01:00
Ronny Pfannschmidt b531f7d585
Merge pull request #3898 from RonnyPfannschmidt/remove-yield-and-compatprop
Remove yield and compatprop
2018-11-30 13:19:23 +01:00
Ronny Pfannschmidt 7eb28f9eb7 remove yield tests and compat properties 2018-11-30 10:40:13 +01:00
Anthony Sottile 1d86247b2c
Merge pull request #4443 from asottile/deprecate_raises_exec
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')`.
2018-11-29 11:57:56 -08:00
Anthony Sottile 1bba0a9714 Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)') 2018-11-29 09:34:51 -08:00
Bruno Oliveira 5cf69fae7d
Merge pull request #4466 from nicoddemus/merge-master-into-features
Merge master into features
2018-11-27 05:37:15 -02:00
Bruno Oliveira b73e083d9d Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-11-26 12:55:05 -02:00
Bruno Oliveira d8e00c983e
Merge pull request #4465 from nicoddemus/appveyor-retry
[skip travis] Use retry script on AppVeyor
2018-11-26 12:54:02 -02:00
Bruno Oliveira b00b715cb6 [skip travis] Use retry script on AppVeyor
Fix #4387
2018-11-26 11:35:34 -02:00
Anthony Sottile 7d3ca68be6
Merge pull request #4464 from asottile/dash_q_escaped
Display actual test ids in `--collect-only`
2018-11-25 11:30:26 -08:00
Anthony Sottile e9b2475e29 Display actual test ids in `--collect-only` 2018-11-25 09:33:18 -08:00
Bruno Oliveira d05b30ce11
Merge pull request #4462 from asottile/bump_pygments_pytest
Bump pygments-pytest
2018-11-25 00:01:06 -02:00
Anthony Sottile 2eac1bfcb8 Bump pygments-pytest 2018-11-24 17:25:53 -08:00
Bruno Oliveira 91b25c4dec
Merge pull request #4461 from asottile/fix_rtd
Fix rtd by installing pygments-pytest
2018-11-24 21:24:52 -02:00
Anthony Sottile d219e033e9 Fix rtd by installing pygments-pytest 2018-11-24 14:48:12 -08:00
Ronny Pfannschmidt 59f65230b5
Merge pull request #4454 from nicoddemus/merge-master-into-features
Merge master into features
2018-11-24 16:34:20 +01:00
Anthony Sottile 3d8d04c6f8
Merge pull request #4456 from asottile/pygments_pytest
Highlight docs with pygments-pytest
2018-11-24 07:32:51 -08:00
Daniel Hahler 5bee396e4b Merge master into merge-master-into-features 2018-11-24 13:47:10 +01:00
Bruno Oliveira 8facf1db90
Merge pull request #4457 from nicoddemus/test-request-garbage
Try to fix/improve reporting of test_request_garbage
2018-11-24 10:08:44 -02:00
Bruno Oliveira 9e522c97fa Try to fix/improve reporting of test_request_garbage
* Run it in a subprocess to reduce possible intereference from the outer pytest
* Print the leaked objects to see if they provide any hints
2018-11-24 08:29:39 -02:00
Anthony Sottile 7015801377 Highlight docs with pygments-pytest 2018-11-23 22:01:30 -08:00
Anthony Sottile 860bc50772
Merge pull request #4451 from asottile/report_correct_filename_raises_exec
Fix `raises(..., "code(string)")` frame filename.
2018-11-23 17:29:09 -08:00
Bruno Oliveira 33b877cc01 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-11-23 23:27:41 -02:00
Bruno Oliveira f75f2117d0
Merge pull request #4450 from nicoddemus/release-4.0.1
Release version 4.0.1
2018-11-23 23:21:49 -02:00
Anthony Sottile 0d5298475d Fix `raises(..., "code(string)")` frame filename. 2018-11-23 15:01:35 -08:00
Daniel Hahler be3b8fc9c1 Fix warnings summary header appearing twice
Ref: https://github.com/pytest-dev/pytest/pull/4450#discussion_r236017645
Ref: https://github.com/pytest-dev/pytest/pull/4399
2018-11-23 22:47:58 +01:00