Skip to content

Possible regression of pdb suppressing output #3052

@foxx

Description

@foxx

Hey guys, /cc @nicoddemus

Approx two years ago I submitted a patch for --pdb to stop suppressing output, seen here;
#1223

I can see the PR was merged and the appropriate test is present in master;

child = testdir.spawn_pytest("--pdb %s" % p1)

But when trying to use this myself, it doesn't seem to work, as seen below.

Any thoughts why this would pass unit tests, but wouldn't work in latest release?

user@c5595a22fd91:~/src/wtf$ cat test_all.py
def test_all():
    print('getrekt')
    assert False
user@c5595a22fd91:~/src/wtf$ pytest --pdb test_all.py
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.6.3, pytest-3.3.1, py-1.5.2, pluggy-0.6.0 -- /usr/bin/python3
cachedir: ../.cache
rootdir: /home/user/src, inifile: pytest.ini
collected 1 item
run-last-failure: run all (no recorded failures)

test_all.py::test_all FAILED                                                                                                                                                                                                           [100%]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Traceback (most recent call last):
  File "/home/user/src/wtf/test_all.py", line 3, in test_all
    assert False
AssertionError: assert False
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/user/src/wtf/test_all.py(3)test_all()
-> assert False

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: debuggingrelated to the debugging builtin plugintype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions