Commit Graph

7119 Commits

Author SHA1 Message Date
Ronny Pfannschmidt d00e2da6e9
Merge pull request #2881 from dawran6/2658
Document pytest.param
2017-10-30 09:36:33 +01:00
Thomas Hisch 2f993af54a Fix context output handling for doctests
Show full context of doctest source in the pytest output, if the lineno of
failed example in the docstring is < 9.
2017-10-29 20:06:10 +00:00
Daw-Ran Liou af5e9238c8 Document pytest.param
Append example for pytest.param in the example/parametrize document.
2017-10-28 14:25:09 -07:00
Samuel Dion-Girardeau 8e178e9f9b Add myself to AUTHORS list 2017-10-28 15:08:53 -04:00
Samuel Dion-Girardeau 8e28815d44 Add changelog entry for issue #2879 2017-10-28 15:08:07 -04:00
Samuel Dion-Girardeau b27dde24d6 Use a nametuple for `readouterr()` results
This allows accessing `out` and `err` directly by attribute,
while preserving tuple unpacking.

Also added tests, one for the `capsys` fixture, and one for the
`MultiCapture` class itself.
2017-10-28 14:53:19 -04:00
Ronny Pfannschmidt 4a436f2255 move responsibility for parameterset extraction into parameterset class 2017-10-27 17:55:07 +02:00
Bruno Oliveira 27cea340f3 Remove trailing whitespace 2017-10-26 21:55:28 -02:00
Bruno Oliveira c3ba9225ef Change directory for py27 xdist-related envs
The "filter_traceback" function was not filtering the frames
that belonged to the pytest internals.

"filter_traceback" was receiving *relative* paths when running with
xdist, and full paths in non-distributed runs; for this reason
the traceback function did not consider the received path to be
relative to the pytest internal modules.

Fix #2843
2017-10-26 21:34:41 -02:00
Bruno Oliveira 111d640bdb Merge pull request #2873 from stephenfin/doc/skipping-entire-files
doc: Include collector config in the skip doc
2017-10-26 20:21:31 -02:00
Bruno Oliveira 734c435d00 Merge pull request #2870 from Perlence/rewrite-python-37-docstring
Adapt the Python 3.7 AST changes
2017-10-26 20:15:22 -02:00
Bruno Oliveira 27bb2eceb4 Add comment about why we remove docstrings on test_assertrewrite
As explained in pytest-dev/pytest#2870
2017-10-26 20:15:05 -02:00
Stephen Finucane 383239cafc doc: Include collector config in the skip doc
None of the decorators are sufficient to skip an entire file, for
example if the file contain invalid code for a given Python version.
Simply link to details about customizing the collector.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-26 17:14:29 +01:00
Sviatoslav Abakumov fd7bfa30d0 Put imports on the last line unless there are other exprs 2017-10-25 11:05:07 +03:00
Sviatoslav Abakumov 3427d27d5a Try to get docstring from module node 2017-10-25 10:54:43 +03:00
Ronny Pfannschmidt def471b975 Merge pull request #2869 from nicoddemus/merge-master-into-features
Merge master into features
2017-10-25 09:08:08 +02:00
Ronny Pfannschmidt f743e95cfc Merge pull request #2791 from OfirOshir/features
bugfix for issue #2491
2017-10-25 09:04:01 +02:00
Bruno Oliveira 4e581b637f Use zip and map from six 2017-10-24 22:13:32 -02:00
Bruno Oliveira 6b86b0dbfe Fix additional linting issues 2017-10-24 21:01:00 -02:00
Bruno Oliveira 0b540f98b1 Merge pull request #2864 from bilderbuchi/fix-1505
Introduce a dedicated section about conftest.py
2017-10-24 20:12:46 -02:00
Bruno Oliveira bdab29fa3d Merge pull request #2867 from Perlence/ini-markers-whitespace
Strip whitespace from markers in INI config
2017-10-24 20:11:20 -02:00
Bruno Oliveira 6821d36ca5 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2017-10-24 19:57:14 -02:00
Ronny Pfannschmidt 5631a86296 Merge pull request #2862 from tom-dalton-fanduel/issue-2836-fixture-collection-bug
Issue 2836 fixture collection bug
2017-10-24 16:32:50 +02:00
Sviatoslav Abakumov 52aadcd7c1 Strip whitespace from markers in INI config
Resolves #2856.
2017-10-24 14:18:39 +03:00
Tom Dalton f5e72d2f5f Unused import / lint 2017-10-24 11:25:42 +01:00
Tom Dalton a5ac19cc5e Merge branch 'issue-2836-fixture-collection-bug' of github.com:tom-dalton-fanduel/pytest into issue-2836-fixture-collection-bug 2017-10-24 10:45:06 +01:00
Tom Dalton 14e3a5fcb9 Move the generic separator to a constant 2017-10-24 10:42:16 +01:00
Florian Bruhin 7b608f976d Merge pull request #2865 from nicoddemus/contributing-docs
Make CONTRIBUTING and PR template more consistent regarding doc contributions
2017-10-24 06:46:32 +02:00
Bruno Oliveira fe560b7192 Make CONTRIBUTING and PR template more consistent regarding doc contributions 2017-10-23 18:46:14 -02:00
Bruno Oliveira b61cbc4fba Merge pull request #2859 from OwenTuz/issue-2692-document-setup-teardown-mismatch-in-unittest-integration
2692.docs document setup/teardown behaviour when using unittest-based su…
2017-10-23 18:35:25 -02:00
Bruno Oliveira a3ec3df0c8 Add E722 and E741 flake errors to the ignore list
Also fixed 'E704 multiple statements on one line (def)' in python_api
2017-10-23 18:19:15 -02:00
Christoph Buchner e23af009f9 Introduce a dedicated section about conftest.py
Also reorganize conftest-related content a bit.
Closes #1505, closes #1770.
2017-10-23 22:11:09 +02:00
Florian Bruhin 531e0dcaa3 Merge pull request #2863 from lancelote/patch-1
Remove typo @ in assignment
2017-10-23 20:51:07 +02:00
Pavel Karateev dc5f33ba5c Remove typo @ in assignment 2017-10-23 21:39:13 +03:00
Tom Dalton 655ab0bf8b Address more review comments, fix massive bug I reintroduced in the node-splitting code :-/ 2017-10-23 17:49:49 +01:00
Tom Dalton a7199fa8ab Docstring typo 2017-10-23 16:59:56 +01:00
Tom Dalton d714c196a5 Shorter code, longer docstring 2017-10-23 16:55:35 +01:00
Tom Dalton ee7e1c94d2 Remove redundant if, tidy if-body 2017-10-23 16:12:07 +01:00
Tom Dalton de9d116a49 Added Tom Dalton to AUTHORS 2017-10-23 15:37:15 +01:00
Tom Dalton f003914d4b Add changelog entry for #2836 2017-10-23 15:37:02 +01:00
Tom Dalton 1e6dc6f8e5 Working (I think) fix for #2836 2017-10-23 13:26:42 +01:00
Tom Dalton c03612f729 Test now looks for real expected output 2017-10-23 12:40:32 +01:00
Tom Dalton 29fa9d5bff Add failing test 2017-10-23 12:28:54 +01:00
Owen Tuz 3cdbb1854f #2692: Document setup/teardown behaviour when using unittest-based suites 2017-10-21 23:12:49 +01:00
Ronny Pfannschmidt 083084fcbc Merge pull request #2842 from ceridwen/features
Use funcsigs and inspect.signature to do function argument analysis
2017-10-20 07:49:08 +02:00
Bruno Oliveira f7387e45ea Fix linting 2017-10-19 21:50:15 -02:00
Ceridwen 3da28067f3 Replace introspection in compat.getfuncargnames() with inspect/funcsigs.signature 2017-10-19 16:01:26 -07:00
Bruno Oliveira 5c71151967 Add more text to the 2.6 and 3.3 announcement
The text was a bit short for this important announcement.
2017-10-19 20:48:23 -02:00
Ronny Pfannschmidt 3f9f4be070 Merge pull request #2845 from jespino/fix/2832
Adding Failed exception to manage maxfail behavior
2017-10-19 09:12:11 +02:00
Bruno Oliveira 4cb60dac3d Merge pull request #2850 from bilderbuchi/docs-911
Add documentation about python -m pytest invocation.
2017-10-18 19:44:52 -02:00