Daniel Hahler
6f0a5789fb
Merge master into features
2019-04-14 23:22:21 +02:00
Anthony Sottile
da2e092163
pre-commit autoupdate
2019-04-12 04:52:47 -07:00
Zac-HD
00810b9b2a
Register "issue" mark for self-tests
2019-03-31 14:22:30 +11:00
Daniel Hahler
e1ae469504
Merge master into features
2019-03-26 10:23:21 +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
3127ec737b
Fix pytest's own tests with `-W error::ResourceWarning`
2019-03-24 11:05:00 +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
05d55b86df
tests: minor sys.path cleanup
2019-03-22 16:20:55 +01: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
c334adc78f
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com>
2019-03-03 11:20:00 -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
Anthony Sottile
4c7ddb8d9b
Fix `parametrize(... ids=<function>)` when the function returns non-strings.
2019-02-07 12:25:59 -08:00
Anthony Sottile
2264db7f4a
Merge pull request #4682 from arel/parameterize-conditional-raises-document-only
...
Document parametrizing conditional raises
2019-02-02 13:15:26 -08:00
Bruno Oliveira
ade5f2c8c5
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-01-29 19:36:56 -02:00
Arel Cordero
fd4289dae0
Adding `does_not_raise` to documentation only
2019-01-27 16:42:10 +00:00
Arel Cordero
977adf1354
Improving sphinx docs based on feedback
2019-01-27 16:41:23 +00:00
Arel Cordero
afe9fd5ffd
Adds `does_not_raise` context manager
...
Addressing issues #4324 and #1830
2019-01-27 16:40:35 +00:00
Ronny Pfannschmidt
5567c772cd
quick&dirty fix fixture tests that rely on tmppath fixture structure
2019-01-27 14:19:23 +01:00
Bruno Oliveira
daf39112e7
Merge pull request #4091 from nicoddemus/setup-methods-as-fixtures-3094
...
Use fixtures to invoke xunit-style fixtures
2019-01-23 19:23:31 -02:00
Anthony Sottile
ec5e279f93
Remove and ban use of py.builtin
2019-01-20 11:59:48 -08:00
Anthony Sottile
16546b7342
Remove some dead code
...
- I wrote a thing: https://github.com/asottile/dead
- wanted to try it out, there's lots of false positives and I didn't look
through all the things it pointed out but here's some
2019-01-13 20:41:30 -08:00
Bruno Oliveira
0f918b1a9d
xunit-style functions and methods are invoked by autouse fixtures
...
Fix #3094 , Fix #517
2019-01-10 12:10:04 -02:00
Bruno Oliveira
c378cb4793
Remove support for applying marks to values in parametrize
...
Fix #3082
2018-12-20 16:16:13 -02:00
Bruno Oliveira
0115766df3
Calling fixtures directly is now an error instead of a warning
...
Fix #4545
2018-12-19 09:26:29 -02:00
Ronny Pfannschmidt
e63c7a13ff
Merge pull request #4327 from ndevenish/approx
...
Let approx() work on more generic sequences
2018-12-17 15:21:12 +01:00
Bruno Oliveira
75e93e5168
Merge pull request #4556 from nicoddemus/idfunc-failure
...
Errors in parametrize id functions now propagate the error instead of issuing a warning
2018-12-17 10:36:15 -02:00
Bruno Oliveira
1499778d5e
Errors in parametrize id functions now propagate the error instead of issuing a warning
...
Fix #2169
2018-12-14 21:07:54 -02:00
Daniel Hahler
8e287c5c77
Merge master into features
2018-12-14 16:44:43 +01:00
Bruno Oliveira
1e80a9cb34
Remove pytest_funcarg__ prefix support for defining fixtures
...
Fix #4543
2018-12-13 21:41:38 -02:00
Bruno Oliveira
5b83417afc
Deprecate the 'message' parameter of pytest.raises
...
Fix #3974
2018-12-12 22:26:30 -02:00
Anthony Sottile
a254ad0436
Raise `TypeError` for `with raises(..., match=<non-None falsey value>)`.
2018-12-12 14:59:22 -08:00
Bruno Oliveira
e3d30f8ebf
Remove deprecated PyCollector.makeitem
...
Fix #4535
2018-12-12 14:15:52 -02:00
Daniel Hahler
539d3dc34d
Merge branch 'fix-test_raises_exception_looks_iterable' into merge-master
2018-12-10 06:30:36 +01:00
Daniel Hahler
5ecbb02ace
tests: fix test_raises_exception_looks_iterable
...
Started to fail on py37-xdist between
https://travis-ci.org/pytest-dev/pytest/jobs/465498973 and
https://travis-ci.org/pytest-dev/pytest/jobs/465792343 , but could not
find a diff in versions (from the tox header), and both commits failed
locally.
2018-12-10 06:26:32 +01: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
Ronny Pfannschmidt
7eb28f9eb7
remove yield tests and compat properties
2018-11-30 10:40:13 +01:00
Anthony Sottile
1bba0a9714
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')
2018-11-29 09:34:51 -08:00
Anthony Sottile
e9b2475e29
Display actual test ids in `--collect-only`
2018-11-25 09:33:18 -08:00
Daniel Hahler
5bee396e4b
Merge master into merge-master-into-features
2018-11-24 13:47:10 +01: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
Bruno Oliveira
33b877cc01
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-11-23 23:27:41 -02:00
Anthony Sottile
0d5298475d
Fix `raises(..., "code(string)")` frame filename.
2018-11-23 15:01:35 -08:00
Bruno Oliveira
0b73d6d4f5
Merge pull request #4444 from RonnyPfannschmidt/fix-4386-2
...
fix #4386 - handle uninitialized exceptioninfo in repr/str
2018-11-23 12:40:41 -02:00
Bruno Oliveira
9ae8429a21
Use a more specific exception type in test_raises_repr_inflight
...
As requested during review
2018-11-22 20:24:46 -02:00
Ronny Pfannschmidt
b71bd9b300
fix #4386 - handle uninitialized exceptioninfo in repr/str
2018-11-22 20:52:15 +01:00
Anthony Sottile
b3700f61ba
Fix formatting of print() calls
2018-11-22 00:15:14 -08:00