Commit Graph

87 Commits

Author SHA1 Message Date
holger krekel 4a489af0ff remove the --junitxmlprefix feature - it's kind of YAGNI i guess -
i introduced it after 1.3.1 but don't need it anymore and thus
it's not going to be there for 1.3.2.

--HG--
branch : trunk
2010-07-03 14:44:47 +02:00
holger krekel 5f9876d54e apply patch from Jakub wrt fixing resultlog/xdist combo
--HG--
branch : trunk
2010-07-02 13:01:21 +02:00
holger krekel 149f9e1042 refine reporting with --pdb some more
--HG--
branch : trunk
2010-06-17 12:53:29 +02:00
holger krekel 3f1efe1b57 fix --pdb to not drop interactive on xfailed tests
--HG--
branch : trunk
2010-06-16 12:35:08 +02:00
holger krekel bc6ead1a3c introduce a new --junitprefix option to influence xml reporting.
also internally avoid some redundant code.

--HG--
branch : trunk
2010-06-09 16:18:47 +02:00
holger krekel 0c04577f9f fix issue104 properly xml-escape names in junitxml files
--HG--
branch : trunk
2010-06-09 15:27:45 +02:00
holger krekel 523704f890 make py.test.raises as-VAR be an ExceptionInfo object
but only initialize it after the block is finished.

--HG--
branch : trunk
2010-06-09 14:45:41 +02:00
holger krekel 6951da7da0 merge Ronny's changes, add some documentation and changelog entries
--HG--
branch : trunk
2010-06-09 14:26:08 +02:00
Ronny Pfannschmidt d1c8209875 support using py.test.raises in context manager style
--HG--
branch : trunk
2010-06-09 10:50:00 +02:00
holger krekel 64388832d9 introduce a new request.applymarker() function and refactor
internally to allow for dynamically adding keywords to test
items.

--HG--
branch : trunk
2010-06-08 02:34:51 +02:00
holger krekel b66b5e2715 fix issue 57 - make --looponfail work with xpassing tests
--HG--
branch : trunk
2010-05-26 18:55:50 +02:00
holger krekel c953c7d313 fix issue102 by introducing a --maxfailures=NUM option
also print an informative line about "stopped/interrupted" test runs
near the end.

--HG--
branch : trunk
2010-05-25 16:52:09 +02:00
holger krekel fa074da5a9 when --runxfail is supplied also show tracebacks when running a test that
calls py.test.xfail

--HG--
branch : trunk
2010-05-22 17:08:49 +02:00
holger krekel 29a5b7452e * improve and test --tb=short reporting
* show --tb=short tracebacks for importing test modules

--HG--
branch : trunk
2010-05-22 16:18:24 +02:00
holger krekel 93712a3ce6 terser reporting header
--HG--
branch : trunk
2010-05-22 13:59:01 +02:00
holger krekel 4f7ef0b63f fix issue89 - allow py.test.mark decorators to be used with classes
(if you are using >=python2.6)
also allow to have multiple markers applied at class level
and test and fix a bug with chained skip/xfail decorators:
if any of the conditions is true a test will be skipped/xfailed
with a explanation which condition evaluated to true.

--HG--
branch : trunk
2010-05-21 18:11:47 +02:00
holger krekel 93f91c9607 unify handling of reportcharacters across resultlog/junitxml plugins
--HG--
branch : trunk
2010-05-20 14:35:13 +02:00
holger krekel 925f75088d fix issue91 introduce new py.test.xfail(reason) helper
to imperatively mark a test as expected to fail. Can
be used from within setup and test functions. This is
useful especially for parametrized tests when certain
configurations are expected-to-fail.  In this case the
declarative approach with the @py.test.mark.xfail cannot
be used as it would mark all configurations as xfail.

--HG--
branch : trunk
2010-05-20 13:29:51 +02:00
holger krekel eac0345689 fix wrong test invocation
--HG--
branch : trunk
2010-05-19 17:05:13 +02:00
holger krekel 20424a9c76 fix and test "-rP" option to show xpass-test ids
--HG--
branch : trunk
2010-05-19 16:52:03 +02:00
holger krekel 2229d2d947 revert 1735 - fix issue95 differently: just shift the offending zlib
import (and others) to happen when they are actually needed

--HG--
branch : trunk
2010-05-19 16:42:22 +02:00
holger krekel c3bd29b490 fix issue95 - treat a failing pytest_genscript import
as non-critical, give a hint.

--HG--
branch : trunk
2010-05-19 16:22:23 +02:00
holger krekel 4f5d7948f7 - try to fix the nightly failures by refining internal capturing mechanism
and adding tests, including a "lsof" test for making sure the number of
  open file descriptors does not increase.
- also move a py.io related logging test to testing/io

--HG--
branch : trunk
2010-05-18 16:01:58 +02:00
holger krekel 1a97c59439 fix test to account for earlier capfd skipping (on jython)
--HG--
branch : trunk
2010-05-18 09:54:04 +02:00
holger krekel e71685736e fix issue96 - make capturing more resilient against KeyboardInterrupt
--HG--
branch : trunk
2010-05-17 19:00:39 +02:00
holger krekel 379390a8aa remove code.new() function and store lines directly into linecache.cache instead.
This avoids the need for custom code objects, improving compatibility for jython
and pypy-c.

--HG--
branch : trunk
2010-05-11 22:54:04 +02:00
holger krekel ee036223ce deprecate --report option in favour of a new shorter and easier to remember -r option: this takes a string argument consisting of any combination of 'xsfX'
Those letters basically correspond to the letters you see during terminal reporting.

--HG--
branch : trunk
2010-05-05 19:50:59 +02:00
holger krekel c933ada7fb new --runxfail option to ignore xfail markers on functions
--HG--
branch : trunk
2010-05-04 13:02:27 +02:00
holger krekel 28150c7486 add unit-tests for xfail and refine xfail handling and reporting
--HG--
branch : trunk
2010-05-04 12:37:56 +02:00
holger krekel dd7fd97810 add a terminalreporter.testid method
--HG--
branch : trunk
2010-05-04 12:37:52 +02:00
holger krekel 1a8b2838fa add new parameters:
xfail(run=False) will not run expected-to-fail tests
xfail(reason=True) will report the specified reason

--HG--
branch : trunk
2010-05-02 22:13:16 +02:00
holger krekel 82d4aae571 some internal fixes regarding the new required hook-finding prefix
--HG--
branch : trunk
2010-05-02 17:10:38 +02:00
Benjamin Peterson d93016d85f remove the unused return value of fnmatch_lines
--HG--
branch : trunk
2010-04-28 17:12:38 -05:00
holger krekel 22a50a5b88 * various jython related fixes.
* more care for print-errors including unicode-encoding related errors.

--HG--
branch : trunk
2010-04-28 15:24:38 +02:00
holger krekel 78d33a2f28 * rather expose internal exceptions under py.test.ACTION.Exception
with ACTION being skip, fail, exit, raises.
* move and refine test_outcome.py tests into runner tests

--HG--
branch : trunk
2010-04-28 08:42:56 +02:00
holger krekel d5e463605e * properly expose and document runtest-protocol related Exceptions
and move all definitions to the runner plugin for now.

* also move EXIT codes to session.py, obsoleting outcome.py alltogether.

--HG--
branch : trunk
2010-04-27 21:13:09 +02:00
holger krekel ed7a2d2da3 refine/fix isimportable-logic and ensure that 'tmpdir' has a python-importable name
--HG--
branch : trunk
2010-04-27 16:10:25 +02:00
holger krekel c8d78177b9 (fixes issue85) correctly write non-ascii test output to junitxml files, refine some internal methods for it
--HG--
branch : trunk
2010-04-27 15:15:43 +02:00
Benjamin Peterson 7629b8fda7 make test source syntax valid
--HG--
branch : trunk
2010-04-23 20:49:00 -05:00
holger krekel b3a05b545e another couple of checks on jython, still some problems
--HG--
branch : trunk
2010-04-23 19:05:22 +02:00
holger krekel 85d35f7418 introduce an experimental approach for allowing dynamic addition of hooks from plugin. Plugins may register new hooks by implementing the new
pytest_registerhooks(pluginmanager)

and call

    pluginmanager.registerhooks(module)

with the referenced 'module' object containing the hooks.

The new pytest_registerhooks is called after pytest_addoption
and before pytest_configure.

--HG--
branch : trunk
2010-04-22 11:57:57 +02:00
holger krekel 061f4c1515 robustify check
--HG--
branch : trunk
2010-04-21 14:46:41 +02:00
holger krekel c7326f1949 fix a pdb problem when dropping to a "raises" related failure
--HG--
branch : trunk
2010-02-08 14:17:01 +01:00
holger krekel 105ed6dcaa fix this test
--HG--
branch : trunk
2010-02-05 22:57:46 +01:00
holger krekel 3234e6e978 add a --funcargs option showing available funcargs
--HG--
branch : trunk
2010-02-04 23:45:07 +01:00
holger krekel 9d64d7e27a refine setup ordering some more - test and avoid a problem with funcarg setups where the
surrounding setup_module would fail, but the funcarg setup still be called (which might
assume that setup_module has been called so would raise a confusing error)

--HG--
branch : trunk
2010-01-28 15:36:27 +01:00
holger krekel a2af204687 again addresses issue78 : we now call teardown also if setup raised a Skipped exception.
I also made sure, setup_module/class will only be called once - before they'd be call again
and again if they raise an error or a skip - for each test in their scope.

--HG--
branch : trunk
2010-01-28 14:20:58 +01:00
holger krekel 98608611af closes #67 new super-short traceback-printing option: "--tb=line" will print a single line for each failing (python) test indicating its filename, lineno and the failure value
--HG--
branch : trunk
2010-01-27 12:52:19 +01:00
holger krekel b18ab6e03b fix issue78 - now python-level teardown functions are now called even if the setup failed.
Important detail: if the setup raises a Skipped exception, teardown will not be called.  This helps
to avoid breaking setup_module/class that performs a skip - it would otherwise internally
be considered as a "successful" setup in order to have teardown called later.  I guess
it also makes sense to treat Skip specially because it is unlikely a teardown should be
called if a Skip was raised on setup.

In any case, failing setups and teardowns will be reported separately.

--HG--
branch : trunk
2010-01-27 12:09:30 +01:00
holger krekel d3c0ff3a1f make sure we get an absolute path when writing the genscript file
--HG--
branch : trunk
2010-01-18 16:48:20 +01:00