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
holger krekel
db6f347db6
fix issue358 -- introduce new pytest_load_initial_conftests hook and make capturing initialization use it, relying on a new (somewhat internal) parser.parse_known_args() method.
...
This also addresses issue359 -- plugins like pytest-django could implement a pytest_load_initial_conftests hook like the capture plugin.
2013-09-30 13:14:16 +02:00
holger krekel
ac19212b2d
remove very likely unused pytest_plugin_unregister hook (pytest itself and all plugins i know don't use it)
2013-09-28 22:22:57 +02:00
holger krekel
1fc466e8ac
add terminalreporter.section|line methods to print extra information.
2013-09-27 15:48:03 +02:00
holger krekel
209a0cd5b2
is actually a new feature, the syntax: pytest.mark.parametrize("arg1,arg2", ...)
2013-09-27 14:15:53 +02:00
holger krekel
9ddfd62848
re-order CHANGELOG and group it into "features" and "bugs" and "known incompatibilities"
2013-09-27 12:58:26 +02:00
holger krekel
39503932a4
merge monkeypatch.replace into monkeypatch.setattr, also support monkeypatch.delattr.
2013-09-27 12:33:06 +02:00
holger krekel
2bdd034242
fix issue355: junitxml generates name="pytest" tag.
2013-09-26 08:45:50 +02:00
holger krekel
d565df90ad
fix issue333: fix a case of bad unittest/pytest hook interaction.
2013-09-09 09:56:53 +02:00
holger krekel
c478027805
make "import pdb ; pdb.set_trace()" work natively wrt capturing (no "-s" needed
...
anymore), turning ``pytest.set_trace()`` into a mere shortcut.
2013-09-06 15:29:00 +02:00
holger krekel
94ee37cdb3
- fix issue181: --pdb now also works on collect errors. This was
...
implemented by a slight internal refactoring and the introduction
of a new hook ``pytest_exception_interact`` hook.
- fix issue341: introduce new experimental hook for IDEs/terminals to
intercept debugging: ``pytest_exception_interact(node, call, report)``.
2013-09-06 11:56:04 +02:00
holger krekel
517d498285
fix issue169: respect --tb=style with setup/teardown errors as well.
2013-09-05 15:43:19 +02:00
holger krekel
ca7c1f5d8e
merge pull request #27 : correctly handle nose.SkipTest during collection. Thanks
...
Antonio Cuni, Ronny Pfannschmidt. I did a few tweaks to the test and the
activation (depending on if unittest is imported at all).
2013-08-16 11:33:58 +02:00
holger krekel
4b88d6d2d7
monkeypatch.replace() now only accepts a string. Improved error handling and
...
docs thanks to suggestions from flub, pelme, schmir, ronny.
2013-08-07 16:49:29 +02:00
holger krekel
407283ef81
a new monkeypatch.replace(target, value) call which derives the
...
monkeypatch location from target (can be class/module/function or
string which is taken as importable python path)
examples:
monkeypatch.replace(os.path.abspath, lambda x: "")
monkeypatch.replace("requests.get", ...)
2013-08-07 15:35:27 +02:00
holger krekel
7d86827b5e
ref #322 cleanup all teardown calling to only happen when setup succeeded.
...
don't use autouse fixtures for now because it would cause a proliferation
and overhead for the execution of every test. Rather introduce a
node.addfinalizer(fin) to attach a finalizer to the respective node
and call it from node.setup() functions if the setup phase succeeded
(i.e. there is no setup function or it finished successfully)
2013-08-02 09:52:40 +02:00
holger krekel
b2ebb80878
fix issue322: tearDownClass is not run if setUpClass failed. Thanks
...
Mathieu Agopian for fixing. The patch moves handling setUpClass
into a new autofixture. (XXX impl-decide if rather adding addfinalizer()
API to node's would have a similar effect)
2013-08-02 00:02:28 +02:00