Commit Graph

675 Commits

Author SHA1 Message Date
holger krekel 05c86aeb28 make sure ihook uses a node's fspath - important for hooks
e.g. during a Module's collect to pick up conftest.py files
residing in the same dir
2012-10-22 16:12:22 +02:00
holger krekel f28f073c7c fix teardown-ordering for parametrized setups/teardowns 2012-10-22 12:16:54 +02:00
holger krekel 036557ac18 fix issue206 - unset PYTHONDONTWRITEBYTECODE in assertrewrite test 2012-10-22 11:14:18 +02:00
holger krekel 1b61fbc8ed - fix test_nose.py by being more tolerant about the error message
(differs between py32 and py33, thanks Arfrever)
- use pypi again now that py is released
2012-10-22 10:55:59 +02:00
holger krekel 97f03edcd6 fix issue205 - nested conftest to pickup pycollect_makemodule - relates to the two
reports of a failing doc/en/example/py2py3.
2012-10-22 10:17:50 +02:00
holger krekel d4d213f83d some more fixes 2012-10-20 14:10:12 +02:00
holger krekel 9ed127b5da fix issue203 - fixture functions with a scope=function should have a "self" that points to the actual instance with which the test functions run. 2012-10-20 09:59:20 +02:00
holger krekel dca5fa2241 fixing links for 2.3 release, and fixing a windows32 failure on py3 2012-10-19 10:53:28 +02:00
holger krekel 586befb945 make usefixtures appear in py.test --markers output 2012-10-19 10:17:13 +02:00
holger krekel b0b6695538 improve automatic id generation for parametrized tests 2012-10-19 10:07:13 +02:00
holger krekel 64544bee1a fix trial tests 2012-10-18 15:09:20 +02:00
holger krekel 7c8755cc89 refine docs, fix a marker/keywords bit, and add a test that request.keywords points to node.keywords. 2012-10-18 15:06:55 +02:00
holger krekel 7d747a1cde remove .markers attribute which was added in development and after 2.2.4
so never released.  Rather extend keywords to also exist on nodes. Assigning
to node.keywords will make the value appear on all subchildren's
keywords.
2012-10-18 13:52:32 +02:00
holger krekel 67de2c53ac fix issue198 - detection of fixtures from conftest.py files in deeper nested dir structures with certain invocations 2012-10-17 13:42:40 +02:00
holger krekel 26ab80c4cd fix and test --fixtures location information 2012-10-17 13:12:33 +02:00
holger krekel 20849a44f5 improve --fixtures output with per-plugin grouping and hiding underscore names in non-verbose mode, re-introduce --funcargs for compatibiliy 2012-10-17 12:57:05 +02:00
holger krekel 98513b995a simplify/integrate fixturemapper into FixtureManager
also fix jstests test failures
2012-10-17 11:20:45 +02:00
holger krekel dc4e205876 typographic fixes, little simplification 2012-10-17 09:21:04 +02:00
holger krekel cc2337af3a refine parsefactories interface, fix two_classes test originally reported by Alex Okrushko, also add a few more tests to make sure autouse-fixtures are properly distinguished 2012-10-16 16:13:12 +02:00
holger krekel 37965657d0 make factorydeflist immutable by using an index 2012-10-16 13:59:12 +02:00
holger krekel 2f3bbdafda use fixturemapper/fixtureinfo from Function objects 2012-10-16 13:48:00 +02:00
holger krekel 021c087701 implement fixture information stored on the parentnode of functions
to be reused by metafunc mechanics and Function setup
2012-10-16 13:47:59 +02:00
holger krekel 4541456a96 add plan for better fixture implementation, an xfailing test
and a slight refactoring of Metafunc tests/creation
2012-10-16 13:47:59 +02:00
holger krekel f5d796b093 improve docs further, refine unittest docs, rename ``autoactive`` to ``autouse``
to better match ``@pytest.mark.usefixtures`` naming.
2012-10-12 14:52:36 +02:00
holger krekel 6eec2f5893 make tmpdir fixture always return a realpath()ed tmpdir and make a note
about it in the changed test.  Currently, i don't see a reason why this
is a bad idea (tm)
2012-10-11 13:05:16 +02:00
holger krekel 0594265adc fix output of --fixtures for @pytest.fixture defined functions. 2012-10-09 16:49:04 +02:00
holger@merlinux.eu 39b8a19cf7 Fix test for windows 2012-10-08 13:42:31 +02:00
holger krekel df643f65f0 remove support for @pytest.fixture on classes, to be reserved for future use:
Fixture-classes could offer setup/teardown/addoption/configure methods
and provide higher level support.  Preliminary allowing it to work on classes
may make introducing it harder.
2012-10-08 11:22:31 +02:00
holger krekel d630d02c5b remove pytest.setup usage 2012-10-08 08:34:21 +02:00
holger krekel cda84fb566 - allow to use fixtures directly, i.e. without ()
- also allow scope to be determined by a dynamic function
2012-10-06 21:03:55 +02:00
holger krekel d3893dd5d1 allow metafunc.parametrize(scope=...) calls to override the scope of a Fixture function definition. This is useful for cases where you want to dynamically
set scope and parametrization for a fixture instead of statically declaring
it on the fixture function.
2012-10-06 21:01:13 +02:00
holger krekel 55a8bfd174 fix issue197 - in case a function is parametrized with zero arguments,
skip it during setup
2012-10-06 11:34:06 +02:00
holger krekel d8c365ef2c implement pytest.mark.usefixtures and ini-file usefixtures setting
and also refine fixture docs a bit - fixtures.txt should now mostly
reflect the current state of the implementation
2012-10-05 19:20:40 +02:00
holger krekel d1a3f5c3a6 make the default non-error pass simpler and faster, refine error reporting by presenting "fixture" tracebacks 2012-10-05 14:24:45 +02:00
holger krekel bb07ba7807 rename a number of internal and externally visible variables to use the fixture name
rather than funcargs.  Introduce .funcargnames compatibility attribute for backward compat.
2012-10-05 14:24:44 +02:00
holger krekel 8282efbb40 internally unify setup and fixture code, making setup a shortcut to fixture(autoactive=True) 2012-10-05 10:21:35 +02:00
holger krekel 9251e747af rename pytest.factory usages into pytest.fixture ones 2012-10-05 10:21:35 +02:00
holger krekel 3049af618c avoid pyc file issues by parametrizing the test instead of rewriting conftest.py files 2012-10-04 11:51:14 +02:00
holger krekel 5173647b4d fixes to against python3.3 2012-10-01 10:14:54 +02:00
holger krekel 57a832812b remove unneccessary internal __request__ funcarg. 2012-10-01 09:23:39 +02:00
holger krekel b9767fd74c remove print, pass python32 2012-09-27 13:27:22 +02:00
holger krekel dbe66f468a ensure proper calling of finalizers in case of parametrization on classes 2012-09-26 12:24:04 +02:00
Ronny Pfannschmidt 35cbb5791d fixes issue 156: monkeypatch class level descriptors 2012-09-25 18:15:13 +02:00
holger krekel a1c3d60747 add an xfail-ed test for a potential future "enabled" parameter to setup functions 2012-09-25 15:04:30 +02:00
holger krekel cd1ead4f7b - make request.funcargnames carry the closure of all used funcargs
- make metafunc.funcargnames carry the closure of used funcargs
2012-09-24 17:04:34 +02:00
holger krekel 7768972ec5 make sure setups are called ahead of the funcarg factories of the test function 2012-09-24 10:36:22 +02:00
holger krekel 754fab9b55 merge 2012-09-22 20:26:13 +02:00
Ronny Pfannschmidt 253a87b2dc fix issue 191 - add support for runTest method of unittest.TestCase subclasses 2012-09-22 18:24:53 +02:00
holger krekel 81082ed3d3 extend --help to tell about --markers and --funcargs 2012-09-22 11:44:56 +02:00
holger krekel 465cfff6f9 don't call nose' setup methods if they are marked with pytest.setup 2012-09-22 00:23:36 +02:00