Bruno Oliveira
199fcf93d4
Merge branch 'master' into 'features'
2016-01-22 18:32:45 -02:00
foxx
f46de68804
Fixes bug with stdout/stderr capture on pdb
2016-01-09 12:04:26 +00:00
Bruno Oliveira
b3166a538c
Pass pytest's config object to pytest_enter_pdb
2015-11-23 14:42:21 -02:00
Bruno Oliveira
de65737cb1
Fix flakes
2015-07-18 18:23:17 -03:00
Bruno Oliveira
2f7d0f8bd9
Consider --color option in more places which deal with TerminalWriters
2015-07-18 16:39:55 -03:00
Wolfgang Schnerring
1408c9f077
Introduce pytest_enter_pdb hook
2014-09-18 14:58:42 +02:00
Bruno Oliveira
5603a0cd4b
Removing py.std usage from _pytest
2014-07-31 19:13:40 -03:00
holger krekel
ce8678e6d5
remove non-documented per-conftest capturing option and simplify/refactor all code accordingly. Also make capturing more robust against tests closing FD1/2 and against pdb.set_trace() calls.
2014-04-01 14:32:12 +02:00
holger krekel
ac1d277225
simplify pdb disabling of capturing, also accomodate the new semantics
...
that capturing is always on during a test session.
2014-03-14 12:49:37 +01:00
holger krekel
9777703e03
- turn on capturing before early conftest loading and make terminal writer
...
use the original stream.
- avoid resetting capture FDs/sys.stdout for each test by keeping capturing
always turned on and looking at snapshotted capturing data during runtest
and collection phases.
2014-03-14 12:49:36 +01:00
holger krekel
b47fdbe0a7
remove externally setting and dealing with "item.outerr" from capturing in favor of a direct interface for adding reporting sections to items.
...
* * *
refactor makereport implementation to avoid recursion with __multicall__
2014-03-14 12:49:34 +01: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
Ronny Pfannschmidt
cf7cae0780
pdb plugin: move entering pdb into a toplevel function
...
this prepares pdb at collect time
2013-04-18 11:18:24 +02:00
Ronny Pfannschmidt
55c349a9eb
charify pdb visible stack end finding by turning it into a function
2013-04-16 10:19:20 +02:00
Ronny Pfannschmidt
73446e98be
turn the postmortem traceback selection to a function
2013-04-16 10:18:08 +02:00
Ronny Pfannschmidt
63a6936d82
move pdb plugin post morten traceback selection to a own function
...
this is preparation for making it resillent against broken envs
that can't import doctest
2013-04-16 08:46:55 +02:00
holger krekel
6e0c30d67d
fix skip/xfail confusion, reported and discussed on
...
http://stackoverflow.com/questions/11105828/in-py-test-when-i-explicitly-skip-a-test-that-is-marked-as-xfail-how-can-i-get
2012-06-23 11:32:32 +02:00
holger krekel
a51e52aee3
fix issue89 apply Daniel Nouri's patch to doctest/--pdb interaction.
2011-11-15 13:28:22 +00:00
Ronny Pfannschmidt
7636dc76e0
support pytest.set_trace in collection
2011-08-01 10:53:37 +02:00
holger krekel
5470cadbff
fix issue25 --pdb and win32/python encodings cause a crash in certain situations.
...
The reason is not clear but avoiding a fresh copy of the terminal writer
helps, maybe because the underlying file object has some state?
2011-03-07 13:17:07 +01:00
holger krekel
9be1cd8007
fix #6 : allow skip/xfail/pdb with trial by hacking the raw exception info out from trial
2010-11-24 11:48:55 +01:00
holger krekel
4fa7a2e8ce
fix #128 show tracebacks for all failures and errors that haven't beed PDB-debugged
2010-11-23 16:10:47 +01:00
holger krekel
bc42cf8ffb
add a way to mark hooks as "tryfirst" or "trylast" to influence its position in a hook chain.
...
Use 'tryfirst' for capturing hooks so they can start capturing as early as possible,
including when conftests add output in runtest_setup hooks.
2010-11-21 23:17:59 +01:00
holger krekel
929291775e
flat is better than nested (cont'd):
...
- pytest.py is new module, making "python -m pytest" work always
- _pytest/*.py now contains core.py, hookspec and the plugins, no sub packages
2010-11-13 11:10:45 +01:00