Commit Graph

59 Commits

Author SHA1 Message Date
holger krekel 56aa9962fc allow fixture functions to be implemented as context managers:
@pytest.fixture
def myfix():
    # setup
    yield 1
    # teardown
2013-05-05 14:48:37 +02:00
holger krekel c5f9958783 never consider a fixture function for test function collection 2013-04-29 10:31:51 +02:00
Floris Bruynooghe c93fbb0e57 Load conftest files in the correct order initially
When the conftest.py files are looked for intially they got loaded
starting from the subdir ending at the parent dir(s).  Later on during
collection any conftest.py files are loaded starting from the parent
dir ending at the subdir.  Due to how extending fixtures works the
latter is correct as otherwise the wrong fixture will be available.
So this changes the initial conftest loading to start at the root and
go towards the subdir.

This does also affect the order of other hooks, hence the order of the
reporting being different in testing/test_terminal.py.
2013-04-18 12:24:53 +01:00
holger krekel 570ad36eaf fix parametrized testid to provide for uniqueness 2013-02-05 17:41:45 +01:00
holger krekel f263f54889 make yielded tests participate in the autouse protocol 2012-11-19 22:17:59 +01:00
holger krekel d66ff7e63e fix autouse invocation (off-by-one error), relates to issue in moinmoin test suite 2012-11-19 22:17:55 +01:00
holger krekel b940ed11a0 fix issue226 - LIFO ordering for fixture-added teardowns 2012-11-16 10:03:51 +01:00
holger krekel dba2a8bc64 fix issue217 - to support @mock.patch with pytest funcarg-fixtures, also split out python integration tests into python/integration.py and fix nose/mark tests 2012-11-06 11:04:11 +01:00
holger krekel ba9b27fcd3 fix issue215 - refactor test_python.py into multiple files:
- python/collect.py cotaining the core collection nodes
- python/fixture.py containing funcargs/fixture code
- python/metafunc.py generate_tests and metafunc usage
- python/raises.py the pytest.raises implementation
2012-11-02 16:04:57 +01:00