holger krekel
817b175870
allow to use pytest.fixture decorator on old-style pytest_funcarg__NAME definitions.
2013-12-04 07:16:34 +01:00
Anatoly Bubenkov
0cfd873abe
implement index-based mechanizm for collection of parametrized tests
...
--HG--
branch : parametrize-hashable
2013-12-03 21:05:19 +01:00
holger krekel
d30ad3f5ce
fix reporting for @mock'd test functions
2013-12-03 11:23:22 +01:00
holger krekel
c0dd7c5975
fix issue275 - allow usefixtures and autouse fixtures
...
for running doctest text files.
2013-11-22 15:35:20 +01:00
holger krekel
1dc2a45cb2
fix issue377 by clarifying in the nose-compat docs that pytest
...
does not duplicate the unittest-API into the "plain" namespace.
2013-11-22 14:07:56 +01:00
holger krekel
08f3a0791d
fix issue357 - special case "-k" expressions to allow for
...
filtering with simple strings that are not valid python expressions.
Examples: "-k 1.3" matches all tests parametrized with 1.3.
"-k None" filters all tests that have "None" in their name
and conversely "-k 'not None'".
Previously these examples would raise syntax errors.
Also add a note to the docs about what is allowed.
2013-11-21 15:25:16 +01:00
holger krekel
e31f40c2d0
fix ordering of finalizers of parametrized interdependent fixtures.
...
This fixes issue246 as reported. Thanks Ralph Schmitt for the
precise failure example.
2013-11-21 14:16:44 +01:00
holger krekel
fc073cb81c
fixed version comparison in pytest.importskip(modname, minverstring)
2013-11-21 13:53:04 +01:00
holger krekel
bb5f1e8173
refactor internal FixtureRequest handling to avoid monkeypatching.
...
One of the positive user-facing effects is that the "request" object
can now be used in closures.
2013-11-21 12:21:52 +01:00
holger krekel
086cc03f05
some amendments/fixes to changelog
2013-11-21 07:46:53 +01:00
Floris Bruynooghe
d67514b657
Fixup changelog
...
This seems to have gone wrong in the merge.
2013-11-21 01:37:48 +00:00
Floris Bruynooghe
a467fbea0d
Merge
2013-11-21 01:16:49 +00:00
holger krekel
73f36fc8b7
fix issue221 - handle importing of namespace-package with no
...
__init__.py properly. (This is a commit after the fix -- the
original issue steps for failure cannot be reproduced anymore).
2013-11-20 21:04:19 +01:00
holger krekel
0a8b27ff49
fix ordering when mock.patch or other standard decorator-wrappings
...
are used with test methods. This fixues issue346. Thanks to
Ronny Pfannschmidt and Donald Stufft for helping to isolate it.
2013-11-19 23:22:27 +01:00
Floris Bruynooghe
72752165df
Ensure all finalizations are run when one fails
...
Fixes issue287.
2013-11-19 17:26:18 +00:00
holger krekel
9b21d3f206
internally make varnames() deal with classes's __init__,
...
although it's not needed by pytest itself atm. Also
fix caching. Fixes issue376.
2013-11-19 15:33:52 +01:00
holger krekel
dde0a81677
don't hide an ImportError when importing a plugin produces one.
...
fixes issue375.
2013-11-19 14:45:51 +01:00
holger krekel
31576fac61
fix issue380 by making --resultlog only rely on longrepr instead
...
of the "reprcrash" attribute which only exists sometimes.
2013-11-19 14:19:29 +01:00
holger krekel
7f49e0fddc
xfail a test on pypy that checks wrong encoding/ascii (pypy does
...
not error out). fixes issue385.
also re-enable pypy tests in tox.
2013-11-19 11:18:51 +01:00
Ronny Pfannschmidt
eda8b02a8d
fix issue384 by removing the trial support code
2013-11-19 10:58:24 +01:00
holger krekel
1fd1617427
fix pexpect-3.0 compatibility for pytest's own tests.
...
(fixes issue386)
2013-11-19 10:10:27 +01:00
holger krekel
a9d1f40c29
merge, add changelog entry
2013-11-02 07:04:26 +01:00
holger krekel
cf9d345382
fix unicode handling with junitxml, fixes issue368.
2013-10-21 16:54:25 +02:00
holger krekel
0d8392bc45
fix unicode handling with new monkeypatch.setattr(import_path, value)
...
API. Thanks Rob Dennis. Fixes issue371.
2013-10-21 14:01:02 +02:00
holger krekel
b0a5740898
fix changelog
2013-10-21 13:34:24 +02:00
holger krekel
bc8c4b3ebd
pytestconfig is now session-config as it is the same object during the
...
whole test run. Fixes issue370
2013-10-21 13:33:36 +02:00
holger krekel
d81b703f10
avoid one surprising case of marker malfunction/confusion::
...
@pytest.mark.some(lambda arg: ...)
def test_function():
would not work correctly because pytest assumes @pytest.mark.some
gets a function to be decorated already. We now at least detect if this
arg is an lambda and thus the example will work. Thanks Alex Gaynor
for bringing it up.
2013-10-11 14:36:54 +02:00
holger krekel
1265cb9952
add changelog entry: refine pytest / pkg_resources interactions: The
...
AssertionRewritingHook PEP302 compliant loader now registers itself with
setuptools/pkg_resources properly so that the
pkg_resources.resource_stream method works properly. Fixes issue366.
Thanks for the investigations and full PR to Jason R. Coombs.
2013-10-11 09:29:28 +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
Benjamin Peterson
56e6ae567c
fix detection of the coding cookie when it is on the second line of the file ( fixes #330 )
2013-10-05 15:16:08 -04:00
Benjamin Peterson
33b663e03d
fix coding cookie detection logic
2013-10-05 15:03:04 -04:00
holger krekel
018860d626
finalize release announcement, changelog
2013-10-04 12:34:47 +02:00
holger krekel
19a76337a4
add pluginmanager.do_configure(config) as a link to
...
config.do_configure() for plugin-compatibility
add some more plugins to plugin-test.sh
2013-10-04 11:36:45 +02:00
holger krekel
0780f2573f
bump version to 2.4.2, regen docs
2013-10-03 19:09:18 +02:00
holger krekel
cec7d47c1f
remove fd-fixing attempt at startup of pytest. It's
...
not clear it's actually needed and it's not nice
to still do FD-dupping when "-s" is specified.
2013-10-03 18:53:40 +02:00
holger krekel
cb65c56037
fix issue365 and depend on a newer py versions which uses colorama
...
for coloring instead of its own ctypes hacks.
2013-10-03 17:46:36 +02:00
holger krekel
2248a31a44
more fixes regarding marking, in particular plugins should use add_marker/get_marker now.
2013-10-03 15:43:56 +02:00
holger krekel
9fdfa155fb
fix issue354: avoid tmpdir fixture to create too long filenames especially
...
when parametrization is used
2013-10-03 14:22:54 +02:00
holger krekel
e49eca8d59
simplify the implementation of NodeKeywords getting rid of __ descriptors appearing there.
2013-10-03 13:53:22 +02:00
holger krekel
071960250f
avoid "IOError: Bad Filedescriptor" on pytest shutdown by not closing
...
the internal dupped stdout (fix is slightly hand-wavy but work).
2013-10-02 12:39:01 +02:00
holger krekel
d3c9927fee
fix regression reported by dstufft: regression when a 1-tuple ("arg",) is used
...
for specifying parametrization (the values of the parametrization were passed
nested in a tuple).
2013-10-02 08:08:26 +02:00
holger krekel
acc5679bc8
adapt changelog
2013-10-02 07:56:30 +02:00
holger krekel
c62bfaefd6
add to CHANGELOG
2013-10-01 22:39:23 +02:00
Floris Bruynooghe
1db6fc87c7
Allow unicode strings in parser.add_argument()
...
This fixes issue360 by also converting unicode strings to the argparse
syntax instead of just native strings.
2013-10-01 13:20:20 +01:00
holger krekel
895d52471b
bump version to dev again, new CHANGELOG section for 2.4.1.dev.
2013-10-01 12:51:52 +02:00
holger krekel
f9927e457b
bump version to 2.4.0
2013-10-01 10:43:36 +02:00
holger krekel
2c7d00579b
bump version, some windows test fixes, prevent logging from raising exceptions at the end (finally), add py25 to tox.ini.
2013-09-30 16:09:26 +02:00
holger krekel
de35b077a2
disallow yield in non-yield-fixtures for now. This is an incompataibility but we want to prepare for possibly merging fixture and yield_fixture some day.
2013-09-30 13:56:54 +02:00
holger krekel
086d4e4ced
strike keyword argument in favour of new pytest.yield_fixture decorator
2013-09-30 13:42:39 +02:00
holger krekel
431ce79d94
add missing entry to CHANGELOG
2013-09-30 13:23:32 +02:00