pytest.mark.hookwrapper
- introduce a CallOutcome class to hold the result/excinfo status of
calling a function.
- rename add_method_controller to add_method_wrapper
updated plugin index docs. Thanks Bruno Oliveira.
fix issue557: with "-k" we only allow the old style "-" for negation
at the beginning of strings and even that is deprecated. Use "not" instead.
This should allow to pick parametrized tests where "-" appeared in the parameter.
at the beginning of strings and even that is deprecated. Use "not" instead.
This should allow to pick parametrized tests where "-" appeared in the parameter.
--HG--
branch : issue557
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.
CWD outside a test package pytest would get fixture discovery wrong.
Thanks to Wolfgang Schnerring for figuring out a reproducable example.
--HG--
branch : conftest-nodeid
After testing with the jython 2.7 beta it seems it will require some
work to get jython back working. So for now remove it from this list
so it doesn't get picked up by normal test runs.
From the python-dev thread it seemed like using
object.__getattribute__(self, 'name') is the cleanest way of
implementing a class wich uses .__getattr__() and should be
pickelable. That only works on new-style classes so this also turns
HookProxy into a new-style class on py2.
This also re-writes the test to not use cPickle so it runs on py3k.
User provided messages, or any valid expression given as second
argument to the assert statement, are now shown in addition to the
py.test introspection details. Formerly any user provided message
would entirely replace the introspection details.
Fixes issue549.
The assertion formatting mini-language depends on newlines being
escaped. Unfortunately if the repr of an object contained
newlines the rewriting module did not escape those, which is now
fixed.
Fixes issue453.
This strips the line number, /@\d/, from the verbose output so it is
directly the node ID of the test. This in turn means no special logic
for accepting the line number as part of the node ID is needed when
parsing the command line.
This test failed only in py34. We don't import logging directly,
but it seems that one of the standard modules that are now
globally imported started including this on py34.
Just removed the assert as it doesn't seem central to the
test's objective.