Bruno Oliveira
3ba475c0f2
Move internal _is_unittest_unexpected_success_a_failure to "compat" module
...
Fix #1815
2016-08-17 22:50:10 -03:00
Bruno Oliveira
463e6572c5
Merge branch 'master' into merge-master-into-features
...
Preparing for 3.0
2016-08-17 22:39:23 -03:00
Bruno Oliveira
4ed412eb59
unittest's unexpectedSuccess should work as non-strict xpass
...
Make sure tests for that behavior obtain the same return code
using either pytest or unittest to run the same file
2016-08-17 21:32:04 -03:00
Raphael Pierzina
225341cf2c
Set wasxfail only for xpass w/o strict and else set longrepr
2016-08-13 00:00:51 +01:00
Raphael Pierzina
296f42a2c9
Treat unittest.expectedFailure pass as a failure
2016-08-12 23:18:36 +01:00
Raphael Pierzina
4fc20d09fe
Change outcome to 'passed' for xfail unless it's strict
2016-08-05 19:25:55 +01:00
Ronny Pfannschmidt
9dadaa8a41
skipping plugin: remove python2.5 compat code
2016-07-20 17:45:20 +02:00
TomV
99c4b6fdc3
issue 1496 - xfail with condition keyword
2016-04-19 18:12:37 +01:00
Quentin Pradet
653a53226a
Add strict parameter to xfail marker doc
2016-03-22 16:01:51 +04:00
Quentin Pradet
1fbd19b8cb
Fix pytest.mark.skip mark when used in strict mode
2016-03-22 15:40:34 +04:00
Bruno Oliveira
5f90907509
Fix skip/xfail markers in parametrized arguments
...
Fix #1412
2016-02-25 19:13:09 -03:00
Bruno Oliveira
0eeb466f11
Fix strict xfail: it should behave exactly like xfail when a test fails
2016-02-15 19:18:48 -02:00
Bruno Oliveira
ee88679c54
Fix bug in strict xfail: test was not being actually called
2016-02-15 18:43:45 -02:00
Bruno Oliveira
7823838e69
Add strict option to xfail, making tests which XPASS to actually fail the suite
...
Fix #1355
2016-02-14 20:52:27 -02:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
David Vierra
fbac936596
Add -rp and -rP options to report passing tests.
...
-rP is an alternative to `-s` for viewing the output of passing tests.
This causes the captured stdout/stderr of passing tests to be output in
the same way as that of failing tests.
-rp adds a simple one-line-per-test summary for passing tests.
Neither option is included by -ra.
Additional changes to `pytest_capturelog` and `pytest_catchlog` are
needed for this option to also output captured logs: They must be
changed to use `rep.sections.add` instead of `rep.longrepr.addsection`,
and to add these additional sections even if the test passes, since
passing tests don't seem to have a `longrepr` at report time.
2015-12-07 11:32:56 -10:00
Michael Aquilina
df874db817
Update default reason to "unconditional skip"
2015-10-03 17:02:18 +01:00
Michael Aquilina
25d74a5919
Dont explicitly inherit from object
2015-10-03 16:55:04 +01:00
Michael Aquilina
213dbe7a5f
newlines
2015-10-03 16:42:15 +01:00
Michael Aquilina
9e57954b03
First argument in pytest.mark.skip is a reason
2015-10-03 16:42:15 +01:00
Michael Aquilina
eee24138b0
Fix failing test
2015-10-03 16:42:15 +01:00
Michael Aquilina
04545f8a54
classes inherit from object
2015-10-03 16:42:15 +01:00
Michael Aquilina
ad0b8e31b8
Fix case where skip is assigned to as an attribute directly
2015-10-03 16:42:14 +01:00
Michael Aquilina
b71add27da
Add MarkEvaluator for skip
2015-10-03 16:42:14 +01:00
Anatoly Bubenkov
6af7172204
Merge branch 'pytest-2.7'
2015-07-19 15:25:04 +02:00
Bruno Oliveira
953916df49
Report correct reason when using multiple skip/xfail markers
2015-07-18 18:18:45 -03:00
holger krekel
13c01193d6
Merge remote-tracking branch 'origin/pytest-2.7'
2015-06-19 10:03:37 +02:00
Bruno Oliveira
9d4e0365da
Skipif marker report now refers to the skipped function
...
Fix #114
2015-06-18 21:59:44 -03:00
holger krekel
bddc88f09e
adapt to pluggy naming, rename pytest.hookspec_opts to pytest.hookspec,s ame with hookimpl_opts
...
--HG--
branch : pluggy1
2015-05-06 10:08:08 +02:00
holger krekel
d2a5c7f99b
add documented hookimpl_opts and hookspec_opts decorators
...
so that one doesn't have to use pytest.mark or function-attribute setting anymore
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
d73e689991
fix issue616 - conftest visibility fixes. This is achieved by
...
refactoring how nodeid's are constructed. They now are always
relative to the "common rootdir" of a test run which is determined by
finding a common ancestor of all testrun arguments.
--HG--
branch : issue616
2015-02-26 21:56:44 +01:00
holger krekel
0253f7b8d5
remove all occurences of "__multicall__" on hook impls in pytest/*.
...
also simplify pytest_runtest_markereport hook in _pytest/skipping.py
while touching the code anyway.
2014-10-08 20:23:40 +02:00
Floris Bruynooghe
62b8712ca9
Let xfail work on non-python Items
...
For some reason xfail was only implemented on non-python Item
instances. This removes this guard which means plugins creating new
items can raise pytest.xfail.Exception and it will work as expected.
2014-09-23 23:55:26 +01:00
Bruno Oliveira
5603a0cd4b
Removing py.std usage from _pytest
2014-07-31 19:13:40 -03:00
david@mcbf.net
6a4492a22d
isinstance() on exception value instead of comparing types, consolidate tests
...
--HG--
branch : xfail-cause
2014-07-26 17:46:50 +02:00
david@mcbf.net
7b273b8577
Add mark.xfail argument raises so that unexpected exceptions show up as test failures.
...
--HG--
branch : xfail-cause
2014-07-26 15:11:05 +02:00
Floris Bruynooghe
9711e335d9
Change XPASS colour to be yellow rather then red
...
Unfortunately I'm not sure how to test this.
2014-04-12 10:27:12 -04:00
Jurko Gospodnetić
9fb2079458
replace py.test module references with pytest
...
The only remaining 'py.test' references are:
* those referring to the 'py.test' executable
* those in code explicitly testing py.test/pytest module compatibility
* those in old CHANGES documentation
* those in documentation generated based on external data
* those in seemingly unfinished & unmaintained Japanese documentation
Minor stylistic changes and typo corrections made to documentation next to
several applied py.test --> pytest content changes.
2014-01-18 12:31:33 +01:00
holger krekel
8ac5af2896
fix flakes issues and make --flakes run part of tox runs
2013-10-12 15:39:22 +02:00
holger krekel
a5d4c20905
make "--runxfail" turn imperative pytest.xfail calls into no ops
...
(it already did neutralize pytest.mark.xfail markers)
2013-10-09 22:55:20 +02:00
holger krekel
bbd265184d
support boolean condition expressions in skipif/xfail
...
change documentation to prefer it over string expressions
2013-05-07 18:40:26 +02:00
Floris Bruynooghe
6d1662e4b7
Use py.builtin._basestring
2013-02-15 13:38:40 +00:00
Floris Bruynooghe
48e6aa9dc7
Allow MarkEvaluator expressions to be unicode
...
This fixes issue #266 .
2013-02-15 11:47:48 +00:00
holger krekel
289ee1c6ea
prepare a 2.3.1
2012-10-20 14:05:33 +02:00
holger krekel
f41f7fda68
improve --markers output
2012-10-20 13:56:53 +02:00
holger krekel
6e0c30d67d
fix skip/xfail confusion, reported and discussed on
...
http://stackoverflow.com/questions/11105828/in-py-test-when-i-explicitly-skip-a-test-that-is-marked-as-xfail-how-can-i-get
2012-06-23 11:32:32 +02:00
holger krekel
1bbe1d086c
fix issue160 a failing setup of an xfail-marked tests should
...
be reported as xfail (not xpass)
2012-06-19 23:48:39 +02:00
Ronny Pfannschmidt
6155e9139d
hande the trial todo class by using repr
2012-05-10 01:38:13 +02:00
holger krekel
58933aac2a
try to better handle @unittest.expectedFailure decorator
2012-03-19 22:53:52 -07:00
holger krekel
bc8ee95e72
add ini-file "markers" option and a cmdline option "--markers" to show defined markers. Add "skipif", "xfail" etc. to the set of builtin markers shown with the --markers option.
2011-11-11 22:56:11 +00:00