Commit Graph

127 Commits

Author SHA1 Message Date
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 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 fd473d4002 refine and test new hook registration, now it is called "pytest_addhooks"
similar to pytest_addoption and raises on bogus input.

--HG--
branch : trunk
2010-05-02 16:36:53 +02:00
holger krekel 45e10f4c48 rename pytest_ignore_collect_path to pytest_ignore_collect before release
--HG--
branch : trunk
2010-05-02 15:24:02 +02:00
holger krekel 3efb8028fb update changelog, install info and bum version to 1.3.0
rather than 1.2.2 because of the added features

--HG--
branch : trunk
2010-05-02 15:06:20 +02:00
holger krekel 2630a452b4 fixing and adding to CHANGELOG
--HG--
branch : trunk
2010-04-30 09:53:26 +02:00
holger krekel 962d0fe2be introduce new pytest_pycollect_makemodule(path, parent) hook for
allowing customization of the Module collection object for a matching test module.

--HG--
branch : trunk
2010-04-29 16:53:29 +02:00
holger krekel 811408959f introduce a new pytest_ignore_collect_path(path, config) hook -
returning a true value will prevent considering the path for collection
The hook is called for both files and directory paths.

--HG--
branch : trunk
2010-04-29 16:20:55 +02:00
holger krekel 5ece3858e4 introduce new py.io.saferepr for printing the 'repr' of an object safely
and without consuming too much space

--HG--
branch : trunk
2010-04-29 14:17:07 +02: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 f691292aaa refining changelog + draft release announcement
--HG--
branch : trunk
2010-04-27 16:37:30 +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
holger krekel f6a04b92d2 fix unicode issues (port of pypy/py repo changeset r72526 by Armin)
--HG--
branch : trunk
2010-04-27 12:23:13 +02:00
holger krekel 2ee6653ff7 update distribute
--HG--
branch : trunk
2010-04-23 12:31:11 +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 536252cb2e refine win32 checks to also work on top of jython/win32
--HG--
branch : trunk
2010-04-20 10:45:41 -07:00
holger krekel e45cd7e35e fix issue86 - point to pytest-xdist plugin for looponfailing feature.
--HG--
branch : trunk
2010-04-14 15:05:39 +02:00
holger krekel 1d28dcf140 add links to new plugins
--HG--
branch : trunk
2010-04-12 16:08:12 +02:00
holger krekel 222a08ec03 going for the 1.2.1 release
--HG--
branch : trunk
2010-02-08 16:39:29 +01: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 d163d92b33 actually look into all non-dot subdirs for conftest.py files - recursive walk would be too heavy for large source trees but first-level subdirs are fine IMO. Note that prior to py.test 1.0 doing this "look-ahead" was not easily doable because it was hard to avoid global state in conftest.py, this is not true anymore - so i feel ok telling people to cleanup their conftest files if they get problems (you can imagine people doing all kinds of things at global conftest.py module scope, can't you?)
--HG--
branch : trunk
2010-02-06 22:37:04 +01:00
holger krekel a3d15b2c60 refined usage and options for "py.cleanup":
py.cleanup     # remove "*.pyc" and "*$py.class" (jython) files
    py.cleanup -e .swp -e .cache # also remove files with these extensions
    py.cleanup -s  # remove "build" and "dist" directory next to setup.py files
    py.cleanup -d  # also remove empty directories
    py.cleanup -a  # synonym for "-s -d -e 'pip-log.txt'"
    py.cleanup -n  # dry run, only show what would be removed

--HG--
branch : trunk
2010-02-05 22:50:41 +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 f95877a09b show a short and nice traceback for funcarg lookup errors
--HG--
branch : trunk
2010-02-04 16:01:02 +01:00
holger krekel 7bd60b5abb check and load test*/conftest.py early from anchors -
this makes it a bit more convenient to have command line options
available from a root directory of a project that does not
directly contain a conftest.py

--HG--
branch : trunk
2010-02-04 12:26:53 +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 aa6d2a37e6 upgrade apipkg.py to fix a potential recursive import issue
--HG--
branch : trunk
2010-01-21 20:06:50 +01:00
holger krekel 14feeb9ca1 fix doc links, bump to dev version
--HG--
branch : trunk
2010-01-21 19:34:42 +01:00
holger krekel f7c562e492 better default for bogus terminal getdimensions() call, fixes issue63
--HG--
branch : trunk
2010-01-19 10:34:41 +01:00
holger krekel 09671eb6fc rename logxml plugin to junitxml
--HG--
branch : trunk
2010-01-16 23:33:26 +01:00
holger krekel 40f41496d8 remove dist-testing and looponfail code from core. there remain some (pytest_runner particularly) tests that test both plain and dist modes which cannot be easily dis-entangled. food for thought.
--HG--
branch : trunk
2010-01-13 16:00:33 +01:00
holger krekel d53572a710 introduce a new pytest_report_header(hook) hook to add additional test-run relevant information to the header of a test report.
--HG--
branch : trunk
2010-01-12 21:43:25 +01:00
holger krekel 3296939eda fix sessionstart/sessionfinish handling at the slave side, set "session.nodeid" to id of the slave and make sure "final" teardown failures are reported nicely. fixes issue66.
--HG--
branch : trunk
2010-01-11 17:09:07 +01:00
holger krekel ba1451330e refine rsyncing and internal dir/transferal handling: don't transfer roots in a popen- no-chdir situation and only use one py._pydir everywhere
--HG--
branch : trunk
2010-01-11 14:30:50 +01:00
holger krekel 352e305431 fix and test bug: dist-testing now works again without execnet/pylib installed remotely. fixes issue65.
--HG--
branch : trunk
2010-01-10 23:52:23 +01:00
holger krekel 3a23baf484 add to changelog, remove docstring
--HG--
branch : trunk
2010-01-10 22:10:45 +01:00
holger krekel c6c7d041b7 disable default inclusion of figleaf plugin because it caused test
failures wrt to capturing/logging interaction.  pytest_figleaf should
anyway better become its own externally living plugin.

--HG--
branch : trunk
2010-01-03 11:22:32 +01:00
holger krekel 1b34492108 vastly simplify and cleanup collection initialization by internally
introducing a RootCollector. Note that the internal node
methods _fromtrail and _totrail are shifted to the still internal
config._rootcol.fromtrail/totrail

--HG--
branch : trunk
2010-01-03 01:02:44 +01:00
holger krekel eebeb1b257 enable doctest plugin by default, add a --doctest-glob option and some documentation, regen plugin docs.
--HG--
branch : trunk
2010-01-02 23:30:46 +01:00
holger krekel 56a936993c enhance figleaf setup, enabled by default now (requires --figleaf). Generalize internal ability to show "hints" at the end of "-h".
--HG--
branch : trunk
2010-01-02 22:48:53 +01:00
holger krekel f3e62e38aa streamlined plugin loading: order is now setuptools, ENV, commandline
and setuptools entry point names are turned to canonical namees ("pytest_*")

--HG--
branch : trunk
2010-01-02 17:17:13 +01:00
holger krekel 47df1e16b6 fix some failures introduced by the last commit, document new "pytestconfig" funcarg
--HG--
branch : trunk
2010-01-01 21:03:33 +01:00
holger krekel 2752168a58 introduce --confcutdir option to early-inhibit lookup of conftest files above a certain directory.
--HG--
branch : trunk
2009-12-31 15:10:32 +01:00
holger krekel 587951966f adding a logxml plugin and a --xml=path option generating a junit-xml style result log. The xml result log can be parsed nicely by hudson.
Initial code was based on Ross Lawley's pytest_xmlresult plugin.

--HG--
branch : trunk
2009-12-31 11:25:07 +01:00
holger krekel fa0c7b18bf move standalone script to become a plugin offering "--genscript",
adjust paths accordingly and add CHANGELOG entry.

--HG--
branch : trunk
2009-12-30 19:10:49 +01:00