holger krekel
4ee3831ac9
start reorganizing docs, write more docs, shift plugin docs, to proper documentation,
...
use sphinx, remove old docs ... work in progress.
--HG--
branch : trunk
2010-10-10 23:45:45 +02:00
holger krekel
7e3ff100f6
add to assertion related changelog
...
--HG--
branch : trunk
2010-10-06 19:46:31 +02:00
holger krekel
c62ed0cd93
fix changelog
...
--HG--
branch : trunk
2010-10-06 16:26:55 +02:00
holger krekel
fe54762b93
fix tests to avoid pyc-caching and skip python2.4 which doesn't support "python -m" on packages.
...
--HG--
branch : trunk
2010-10-06 09:40:14 +02:00
holger krekel
eead8f9ab4
fix issue123 - new "python -m py.test" invocation.
...
--HG--
branch : trunk
2010-10-05 17:52:32 +02:00
holger krekel
7c6e47f715
fix issue124 - make test reporting more resilient against tests changing FD 1
...
--HG--
branch : trunk
2010-10-05 17:21:50 +02:00
holger krekel
a054b63bac
introduce py.builtin.any
...
--HG--
branch : trunk
2010-10-05 17:21:27 +02:00
holger krekel
29051458fc
fix issue 109 - sibling conftest.py files shall not be loaded.
...
also simplify / refine tests a bit.
--HG--
branch : trunk
2010-10-04 16:19:01 +02:00
holger krekel
a6003ac332
some fixes after the merge
...
--HG--
branch : trunk
2010-10-02 20:49:24 +02:00
holger krekel
b56d3c223d
merge Floris branch and skip interpret-tests on python2.4
...
--HG--
branch : trunk
2010-10-02 16:15:02 +02:00
holger krekel
2cf22e3124
shift all python related testing functioanlity to a dedicated
...
pytest_python
plugin which incorporates pytest's logic of python function testing (including funcargs).
--HG--
branch : trunk
2010-09-25 18:23:26 +02:00
holger krekel
e2683f4538
refactor all collection related logic
...
- drop all pickling support (for now)
- perform collection completely ahead of test running (no iterativity)
- introduce new collection related hooks
- shift all keyword-selection code to pytest_keyword plugin
- simplify session object
- besides: fix issue88
--HG--
branch : trunk
2010-09-15 10:30:50 +02:00
holger krekel
9ca7ed647b
finalize release announce and changelog
...
--HG--
branch : trunk
2010-09-14 16:36:34 +02:00
holger krekel
79734420df
some small doc fixes
...
--HG--
branch : trunk
2010-09-14 16:18:06 +02:00
Ronny Pfannschmidt
b81e48507c
introduce py.builtin._sysex as alias for the special exceptions, fixes #115
...
--HG--
branch : trunk
2010-09-14 16:12:50 +02:00
holger krekel
af412d993c
simplify and fix installation instructions particularly for windows ( fixes #111 )
...
and bump version to 1.3.4
--HG--
branch : trunk
2010-09-14 15:43:00 +02:00
holger krekel
7903fbb8ce
applied ronny's patch, fixes #116
...
--HG--
branch : trunk
2010-09-08 16:51:46 +02:00
holger krekel
95bafbccd1
fix issue116 : --doctestmodules also works in the presence of __init__.py files, done by fixing the underlyingly used path.pyimport()
...
--HG--
branch : trunk
2010-09-04 09:21:35 +02:00
holger krekel
3654592959
bump version, prepare 1.3.3
...
--HG--
branch : trunk
2010-07-30 15:06:50 +02:00
holger krekel
6aab9bcfb9
another whitespace-correction commit
...
--HG--
branch : trunk
2010-07-30 15:05:24 +02:00
holger krekel
efeae72509
fixes issue113 - assertion represenation issue
...
--HG--
branch : trunk
2010-07-29 12:55:39 +02:00
holger krekel
74523a9d09
avoid loading conftest files which are exactly the same content as a previously loaded conftest file
...
--HG--
branch : trunk
2010-07-29 11:22:16 +02:00
holger krekel
e5d09b771a
fix windows32 terminal coloring
...
--HG--
branch : trunk
2010-07-28 17:33:26 +02:00
holger krekel
677f7c0a6a
remove trailing whitespace everywhere
...
--HG--
branch : trunk
2010-07-26 21:15:15 +02:00
holger krekel
ed8e24312c
fix terminal dimension detection to work with stdout
...
--HG--
branch : trunk
2010-07-26 13:13:10 +02:00
holger krekel
9d47521cf0
finalizing docs
...
--HG--
branch : trunk
2010-07-08 15:28:54 +02:00
holger krekel
86440b1853
ship distribute_setup.py version 0.6.13
...
--HG--
branch : trunk
2010-07-08 13:40:19 +02:00
holger krekel
e98b15eb67
fix windows homedir detection
...
--HG--
branch : trunk
2010-07-08 12:35:43 +02:00
holger krekel
37a2898f18
reintroduce --junit - i think it is actually useful
...
--HG--
branch : trunk
2010-07-07 14:43:31 +02:00
holger krekel
320835d43f
split out pytest-xdist related reporting to the plugin
...
--HG--
branch : trunk
2010-07-07 12:41:15 +02:00
holger krekel
b28c439494
some minor compatibility issues wrt to the just released python2.7
...
--HG--
branch : trunk
2010-07-04 22:13:12 +02:00
holger krekel
f9c5b00ffa
refine and extend custom error reporting particularly for collection-related errors
...
--HG--
branch : trunk
2010-07-04 17:06:50 +02:00
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
f554fa03ae
make initial conftest finding ignore "--" arguments
...
--HG--
branch : trunk
2010-07-01 19:27:40 +02:00
holger krekel
b8db15a94f
refine bestrelpath to return "." for X.bestrelpath(X) and refine its docstring
...
--HG--
branch : trunk
2010-06-28 16:32:43 +02:00
holger krekel
2f50ed3e99
install plain py.test script also for jython
...
--HG--
branch : trunk
2010-06-28 11:59:12 +02:00
holger krekel
da52304a6e
adjust changelog, add fixed issue92
...
--HG--
branch : trunk
2010-06-28 11:26:19 +02:00
holger krekel
f856db29dc
refine py.process.cmdexec handling wrt unicode on all python versions
...
--HG--
branch : trunk
2010-06-25 10:30:15 +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
Benjamin Peterson
2995d65720
fix assertion interpretation when the operator is **
...
--HG--
branch : trunk
2010-06-10 13:50:07 -05:00
holger krekel
77a7d576ec
defer a number of other compiles to frame.eval (patch from Amaury on trunk/pypy fork, thanks)
...
--HG--
branch : trunk
2010-06-10 10:56:14 +02:00
Benjamin Peterson
610cde6f85
Interpret assignments while examining asserts corrects
...
fixes #105
--HG--
branch : trunk
2010-06-09 14:53:11 -05: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
holger krekel
d83bf93154
less imports at function level, add a CHANGELOG entry - i guess
...
there are not many win32/python2.4 users anymore these days.
--HG--
branch : trunk
2010-06-09 12:07:12 +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
c1d0fc9aaf
add ignore_errors to local.remove()
...
--HG--
branch : trunk
2010-06-07 20:48:36 +02:00
holger krekel
10b8de060a
fix py.code.compile to generate unique filenames
...
--HG--
branch : trunk
2010-06-06 19:08:22 +02:00
holger krekel
740a668f52
adding a tox file and a note in changelog
...
--HG--
branch : trunk
2010-06-05 15:59:11 +02:00
holger krekel
46f72d9350
add a CHANGELOG entry for ronny's changes
...
--HG--
branch : trunk
2010-06-03 15:51:59 +02:00
holger krekel
75d80ca183
fix pyimport() bug on directories
...
--HG--
branch : trunk
2010-05-31 17:06:46 +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
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
94ce5b0a5a
refine and structure CHANGELOG
...
--HG--
branch : trunk
2010-05-22 14:13: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
67ec87e7f9
note that issue99 is also fixed
...
--HG--
branch : trunk
2010-05-21 16:51:15 +02:00
holger krekel
578cba20d4
fix issue94 make reporting more robust against bogus source code
...
(and internally be more careful when presenting unexpected byte sequences)
also make py.code.Source accept a list of lines directly.
--HG--
branch : trunk
2010-05-21 16:42:46 +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
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
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
8ba2a98e11
allow to run py.test.cmdline.main() multiple times.
...
--HG--
branch : trunk
2010-05-11 19:56:22 +02:00
holger krekel
0f5ed3abc7
avoid helper functions showing up in py.test tracebacks
...
--HG--
branch : trunk
2010-05-11 17:43:56 +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
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