Commit Graph

3203 Commits

Author SHA1 Message Date
Floris Bruynooghe a5c075c4e2 Respect unicode in AssertionError argument
This is related to issue319
2013-11-24 17:45:48 +00:00
Floris Bruynooghe 90b6ccd321 Ensure the long descriptions and formatting preserve unicode correctly
This is the first stage towards fixing issue319, at least
py.io.saferepr and py.code.ExceptionInfo need to be addressed as well.
2013-11-22 12:28:59 +00:00
Floris Bruynooghe db778fd456 Correct comment 2013-11-22 12:27:34 +00: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 663f824fc4 simplify basedir isolation 2013-11-21 14:54:46 +01:00
holger krekel 2700a94d49 remove an old duplicate marker and use recent pytest mechanism for parametrization 2013-11-21 14:40:14 +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 2e90aaf7af remove _fixturestack attribute now that we have a proper request->subrequest->subrequest chain. 2013-11-21 13:15:32 +01:00
holger krekel 238b890d9b avoid maintaining a fixturestack 2013-11-21 12:42:22 +01:00
holger krekel 49119e31bf fix py25 compat 2013-11-21 12:31:22 +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 05fbd490da addresses issue246: add a test for module/function scope that shows that
finalizer ordering is wrong.
2013-11-21 09:42:24 +01:00
holger krekel 5322f057a0 move two fixture test modules into bigger testing/python/fixture.py 2013-11-21 09:26:45 +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
Floris Bruynooghe 6686c67a41 Re-raise the first exception instead of the last
This will make more sense if multiple fixtures depend on each other.
It would be better if all exceptions could be shown however.

Also depend on python 2.5+ exception hierarchy and use sys module
directly.
2013-11-21 01:15:24 +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 bd8a2cc18c removing pexpect from general dependencies because
it doesn't install on windows anymore.  Instead
to specific configurations for pexpect on py27 and py33
which only call the tests that need it.
2013-11-20 20:00:59 +01:00
holger krekel 6d1b7e94d1 add py33-xdist to tox testing 2013-11-20 16:03:55 +01:00
holger krekel 9eff939b02 remove testing of xdist+genscript -- doesn't really make sense
because for installing pytest-xdist you need pytest installed
which defeats the purpose of genscript.
2013-11-20 15:46:23 +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
Ronny Pfannschmidt 82846777a7 add missing importorskip 2013-11-19 12:21:47 +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 97252a8b66 fix issues link 2013-11-19 09:20:50 +01:00
holger krekel 4a1cc792c9 a script to read bitbucket pytest issues 2013-11-18 21:31:32 +01:00
holger krekel 581b3a110c Merged in hsoft/pytest (pull request #81)
Fix TypeError crash on failed imports under py3.3.
2013-11-15 21:02:30 +01:00
Virgil Dupras e118682db1 Added test for previous crash on failed import fix
Also, rewrote the fix a bit.
ref #383.
2013-11-15 14:03:57 -05:00
holger krekel 4eeb1c4f31 Merged in paylogic/pytest/fix-fixturedef-merge (pull request #86)
correctly check for fixturedef when  merging
2013-11-14 05:58:50 +01:00
Anatoly Bubenkov e2c4730e17 correctly check for fixturedef when merging
--HG--
branch : fix-fixturedef-merge
2013-11-13 18:25:55 +01:00
holger krekel c3e844e561 Merged in nicoddemus/pytest/plugins-index-status-images (pull request #85)
Adding status images in plugins_index
2013-11-13 07:45:40 +01:00
holger krekel fde947e1a8 Merged in paylogic/pytest/ignore-autocomplete-on-darwin (pull request #84)
ignore argcomplete on darwin
2013-11-13 07:44:24 +01:00
holger krekel ce0af892aa Merged in paylogic/pytest/multi-level-fixture-deps-override (pull request #83)
When overridden, fixture's dependencies are called from all levels of folder structure
2013-11-13 07:43:59 +01:00
holger krekel 3f389238f8 Merged in paylogic/pytest/python32-test-fix (pull request #82)
support python32 fix
2013-11-13 07:43:35 +01:00
Bruno Oliveira 1faf95273c Adding status images in plugins_index
--HG--
branch : plugins-index-status-images
2013-11-12 23:54:13 -02:00
Anatoly Bubenkov ba5d4ae42f ignore argcomplete on darwin
--HG--
branch : ignore-autocomplete-on-darwin
2013-11-12 13:52:16 +01:00
Anatoly Bubenkov d18124f5ed support python32
--HG--
branch : python32-test-fix
2013-11-12 13:48:17 +01:00
Anatoly Bubenkov 846cf781a1 use deepest fixturedef for fixture closure
--HG--
branch : multi-level-fixture-deps-override
2013-11-12 13:45:36 +01:00
Anatoly Bubenkov 85dd51ccc8 initial
--HG--
branch : multi-level-fixture-deps-override
2013-11-12 13:35:32 +01:00
Virgil Dupras ded88700a3 Fix TypeError crash on failed imports under py3.3.
Starting with Python 3.3, NamespacePath passed to importlib hooks
seem to have lost the ability to be accessed by index.

We wrap the index access in a try..except and wrap the path in a
list if it happens.

Fixes #383.
2013-11-08 16:59:13 -05:00
holger krekel a9d1f40c29 merge, add changelog entry 2013-11-02 07:04:26 +01:00
holger krekel e2d19aab39 Merged in jameslan/pytest/multi-marks (pull request #79)
Support multiple marks for individual parametrized argument set
2013-11-02 07:02:28 +01:00
James Lan 7210e443ee Support multiple marks for individual parametrized argument set
--HG--
branch : multi-marks
2013-11-01 21:10:13 -07:00