Bruno Oliveira
b6fa4e248f
Merge pull request #4028 from asottile/revert_breakpoint_code
...
Revert patching of breakpointhook as it appears to do nothing
2018-10-24 17:50:19 -03:00
Daniel Hahler
d6832a8b56
Merge pull request #4133 from blueyed/pdb-quit
...
pdb: handle quitting in post_mortem
2018-10-14 11:29:09 +02:00
Bruno Oliveira
e3bf9cede4
Fix linting
2018-10-13 22:13:25 -03:00
Daniel Hahler
86c7dcff68
pdb: handle quitting in post_mortem
...
`help quit` in pdb says:
> Quit from the debugger. The program being executed is aborted.
But pytest would continue with the next tests, often making it necessary
to kill the pytest process when using `--pdb` and trying to cancel the
tests using `KeyboardInterrupt` / `Ctrl-C`.
2018-10-14 00:05:45 +02:00
Daniel Hahler
448830e656
Do not print INTERNALERROR with --pdb
...
This gets printed by the terminal reporter already, and currently
results in the same error being displayed twice, e.g. when raising an
`Exception` manually from `pytest.debugging.pytest_exception_interact`.
2018-10-13 23:56:34 +02:00
Daniel Hahler
d3d8d53e41
tests: test_pdb: fix print statements
2018-10-13 23:33:52 +02:00
Bruno Oliveira
0f5263cdc3
Merge pull request #4109 from njonesu/master
...
Fix multiple string literals on a line #4093
2018-10-11 15:50:08 -03:00
Bruno Oliveira
c9a85b0e78
Fix linting
2018-10-10 19:54:39 -03:00
Daniel Hahler
be511c1a05
tests: add missing expect before sendeof for pdbpp
...
With pdb++ this additional `expect` is required, otherwise `sendeof()`
will block forever.
2018-10-10 20:50:49 +02:00
Daniel Hahler
f36f9d2698
tests: fix/clarify expect for Pdb
...
`expect()` expects an regular expression, so "Pdb" is equivalent to
"(Pdb)".
But instead of escaping the parenthesis this patch removes them, to
allow for matching "(Pdb++)", too.
2018-10-10 20:50:49 +02:00
Niklas JQ
c14a23d4e4
Fix #4093 : multiple string literals on a line
2018-10-10 19:28:31 +02:00
Anthony Sottile
956b3aca97
Revert patching of breakpointhook as it appears to do nothing
2018-09-23 18:39:50 -07:00
Daniel Hahler
e7eb7e799b
logging: del item.catch_log_handler only in teardown
...
Without this caplog.record_tuples etc is not available anymore when using
`--pdb`.
2018-09-19 17:17:47 +02:00
Anthony Sottile
8bb8b91357
pyupgrade 1.4: tests
2018-08-22 18:47:21 -07:00
Jeffrey Rackauckas
067de257e1
Fix test_pdb.py with pexpect
2018-07-02 21:03:21 -07:00
Jeffrey Rackauckas
4a925ef5e9
Fixing bug in test.
2018-07-02 20:29:59 -07:00
Jeffrey Rackauckas
2f1a2cf07f
Fixing --trace test.
2018-07-02 19:55:08 -07:00
Jeffrey Rackauckas
6cc4fe2412
Fixing bad indentation
2018-07-02 19:53:46 -07:00
Jeffrey Rackauckas
10a8691eca
Add support for yielded functions.
2018-07-02 19:46:26 -07:00
Jeffrey Rackauckas
bc268a58d1
Adding needed newline
2018-07-01 20:22:50 -07:00
Jeffrey Rackauckas
0b70477930
Fix linting issues.
2018-07-01 20:18:00 -07:00
Jeffrey Rackauckas
533f4cc10c
Fix test to pass
2018-06-30 21:36:27 -07:00
Jeffrey Rackauckas
952bbefaac
Add initial test.
2018-06-30 18:26:58 -07:00
Anthony Sottile
cbaa7dd56a
Upgrade pre-commit hooks except pyupgrade
2018-06-26 06:35:27 -07:00
Ronny Pfannschmidt
703e4b11ba
run black
2018-05-23 16:48:46 +02:00
Bruno Oliveira
1a880be85b
Remove unused import to fix linting
2018-05-01 19:08:29 -03:00
Brian Maissy
c258fe1459
--pdb treats KeyboardInterrupt as exception
2018-05-02 00:58:35 +03:00
Ronny Pfannschmidt
2241c98b18
Merge pull request #3331 from tonybaloney/breakpoint_support
...
Support for the new builtin breakpoint function in Python 3.7
2018-04-10 07:15:29 +02:00
Bruno Oliveira
0762666bd1
Remove unused pytestPDB import
2018-04-03 08:58:40 -03:00
Anthony Shaw
4d847593b3
remove a test that would fail because pytest is being used to test itself
2018-04-03 10:40:56 +10:00
Bruno Oliveira
804392e5f2
Fix tests that check that breakpoint function is configured/restored
...
* Execute pytest in a subprocess in cases of tests which change global
state
* Parametrize with --pdb and without the flag
2018-03-28 20:19:28 -03:00
Anthony Shaw
09e5a226dc
add broken test
2018-03-29 09:03:20 +11:00
Anthony Shaw
3998b70ff6
add test for custom environment variable
2018-03-28 09:02:37 +11:00
Anthony Shaw
f1f4c8c104
updates for code review recommendations
2018-03-27 17:38:17 +11:00
Anthony Shaw
e97bd87ee2
fix assertion when hypothesis is installed (which is should be for developing in pytest)
2018-03-23 16:24:15 +11:00
Anthony Shaw
242fb7852b
linting and removed double test
2018-03-23 15:39:34 +11:00
Anthony Shaw
db581eabcb
add tests to validate that --pdbcls custom debugger classes will be called when breakpoint() is used
2018-03-23 15:30:05 +11:00
Anthony Shaw
a1ff758d0d
"Added acceptance tests for configuration of sys.breakpointhook and resetting back when system default (pdb) is used""
2018-03-23 14:18:56 +11:00
Anthony Shaw
5a53b9aabb
move tests to test_pdb
2018-03-22 20:40:35 +11:00
Thomas Hisch
0f58fc881b
Add pdb test with disabled logging plugin
...
Implement the test from #3210 , which was not merged yet, because the PR was
abandoned in favor or #3234 .
2018-02-22 19:26:46 +01:00
Bruno Oliveira
7a62619a75
Merge remote-tracking branch 'upstream/master' into features
2018-02-21 10:39:55 -03:00
Thomas Hisch
51ece00923
Add captured-log support to --show-capture
...
Fixes : #3233
2018-02-18 20:18:37 +01:00
Bruno Oliveira
9d879bee36
Merge pull request #3215 from pytest-dev/bugfix/985/disable-output-capturing-in-doctest
...
Disable output capturing in doctest
2018-02-17 18:39:32 -02:00
Brian Maissy
069f32a8c4
print captured logs before entering pdb
2018-02-17 20:32:49 +02:00
Bruno Oliveira
6bc45d158d
Merge pull request #3186 from brianmaissy/bugfix/print_captured_stdout_before_entering_pdb
...
Added printing of captured stdout before entering pdb
2018-02-15 19:38:23 -02:00
Jason R. Coombs
247cdb835a
Remove xfail; tests now pass on macOS. Ref #985 .
2018-02-13 12:41:19 -05:00
Brian Maissy
7656fc8320
Added printing of captured stdout and stderr before entering pdb
2018-02-12 23:17:51 +02:00
Brian Maissy
e64feaba7a
xfail is better than skip
2018-02-03 23:28:37 +02:00
Brian Maissy
74633815aa
skip failing pdb/doctest test on mac
2018-02-03 23:24:11 +02:00
Brian Maissy
4a3863c2e2
use flush in order to avoid hanging on mac
2018-01-14 23:00:23 +02:00
Jurko Gospodnetić
7feab7391d
simplify test_pdb_collection_failure_is_shown test data setup code
2017-12-09 13:34:56 +01:00
Andras Tim
7248b759e8
Fixed E303 flake8 errors
...
too many blank lines (3)
2017-07-17 01:44:23 +02:00
Andras Tim
195a816522
Fixed E265 flake8 errors
...
block comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim
8f3eb6dfc7
Fixed E261 flake8 errors
...
at least two spaces before inline comment
2017-07-17 01:44:22 +02:00
Andras Tim
2e8caefcab
Fixed E225 flake8 errors
...
missing whitespace around operator
2017-07-17 01:44:22 +02:00
Bruno Oliveira
42a5d6bdfa
Add __future__ imports to all pytest modules
...
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Bruno Oliveira
1e0cf5ce4d
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
...
# Conflicts:
# AUTHORS
# CHANGELOG.rst
# _pytest/pytester.py
2017-03-10 15:54:05 -03:00
Michal Wajszczuk
fb0b90646e
New-style classes implemented for python 2.7 - #2147
2017-02-16 20:28:17 +01:00
mbyt
ad56cd8027
extract a _handle_skip method, secure PY2 branch
2017-02-02 05:01:51 +01:00
mbyt
d1c725078a
Allow to skip unittests if --pdb active
...
closes #2137
2017-01-31 04:47:31 +01:00
Bruno Oliveira
5ce551e469
Merge pull request #2075 from pytest-dev/master
...
Merge master into features after fixing flake8 errors
2016-11-22 14:10:31 -02:00
Bruno Oliveira
1eb5a690d4
Fix flake8 E305 and E306 errors
...
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Bruno Oliveira
efc54b2e56
Merge branch 'master' into merge-master-features
2016-11-11 18:56:53 -02:00
Jason R. Coombs
f2c01c5407
Restore pexpect tests and bypass isalive/wait on macOS. Ref #2022 .
2016-10-21 12:36:42 -04:00
Jason R. Coombs
60a347aeb5
Also use flush where wait was called unconditionally
2016-10-21 12:11:35 -04:00
Jason R. Coombs
11ec96a927
Extract child flush as a staticmethod
2016-10-21 12:10:35 -04:00
David Szotten
d75748ef6f
test for calling set_trace with custom pdb cls
2016-09-21 09:45:26 +00:00
David Szotten
c7b4b8cf6f
test
2016-09-21 09:45:23 +00:00
mbyt
696a9112be
integrating review commets of @nicoddemus
...
plus small scale refactoring
2016-08-31 22:33:47 +02:00
mbyt
10b3274924
adding corresponding test, authors and changelog
2016-08-31 20:22:54 +02:00
Ronny Pfannschmidt
c4f20a1834
Merge pull request #1712 from anntzer/custom-debugger
...
Allow passing a custom Pdb subclass via --pdbcls.
2016-07-12 16:45:07 +02:00
Antony Lee
7ee3dd1cb5
Add tests for custom pdb class.
...
(and edit CHANGELOG)
2016-07-11 20:07:29 -07:00
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
aostr
9a5224e2f8
Renamed the pdb module and changed unit tests accordingly
2016-06-25 12:37:31 +02:00
Tom Viner
df9918eda3
issue1625, name getfuncargvalue to getfixturevalue
2016-06-24 10:08:19 +02:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
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
holger krekel
db5649ec6a
streamline pytester API majorly:
...
- integrate conftest into pytester plugin
- introduce runpytest() to either call runpytest_inline (default) or
runpytest_subprocess (python -m pytest)
- move testdir.inline_runsource1 to pdb tests
- strike some unneccessary methods.
- a new section "writing plugins" and some better pytester docs
--HG--
branch : testrefactor
2015-04-28 11:54:53 +02:00
holger krekel
a8afba054a
- refine lsof checking
...
- make runpytest() create an inline testing process instead of
a subprocess one
--HG--
branch : testrefactor
2015-04-28 11:54:46 +02:00
Marc Abramowitz
777bde7c60
Remove xfail_if_pdbpp_installed from test_pdb.py
...
--HG--
branch : remove_pdbpp_xfail
2015-02-19 03:22:05 -08:00
Wolfgang Schnerring
1408c9f077
Introduce pytest_enter_pdb hook
2014-09-18 14:58:42 +02: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
1fd1617427
fix pexpect-3.0 compatibility for pytest's own tests.
...
(fixes issue386)
2013-11-19 10:10:27 +01:00
holger krekel
8ac5af2896
fix flakes issues and make --flakes run part of tox runs
2013-10-12 15:39:22 +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
68786a6434
fix bug where using capsys with pytest.set_trace() in a test
...
function would break when looking at capsys.readouterr()
2012-11-21 20:43:31 +01: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
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
a698465487
streamline docs, especially use "import pytest" and "pytest.*" in python code examples instead of "import py" and "py.test.*".
2010-11-17 22:12:16 +01:00
holger krekel
076e03e90f
also un-nest test directory
2010-11-13 11:30:40 +01:00