Skip to content

Fixed stdout/stderr capture when using pdb #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2016
Merged

Fixed stdout/stderr capture when using pdb #1315

merged 1 commit into from
Jan 9, 2016

Conversation

foxx
Copy link
Contributor

@foxx foxx commented Jan 8, 2016

Fixes #1223

@foxx foxx changed the title Fixes #1223 Fixed stdout/stderr capture when using pdb Jan 8, 2016
@nicoddemus
Copy link
Member

Thanks for the PR @foxx!

This looks good, but it is missing at least one test for that. There are several from test_pdb.py that you can base a test on.

Also, please add a note to the CHANGELOG and yourself to AUTHORS. 😄

@foxx
Copy link
Contributor Author

foxx commented Jan 8, 2016

Doh sorry I got lazy, updating PR now

assert False
""")
child = testdir.spawn_pytest("--pdb %s" % p1)
child.expect("(Pdb)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add a child.expect("getrekt") before this line? This would ascertain that the output actually got displayed before entering pdb.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually, the output is displayed after PDB, so this is definitely a bug. Let me see if I can fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah ignore last comment, I was wrong, it's outputting before PDB. Pushing patch now

@nicoddemus nicoddemus merged commit f46de68 into pytest-dev:master Jan 9, 2016
@nicoddemus
Copy link
Member

Thanks @foxx! I also added a new CHANGELOG entry for the fix. 😄

@foxx foxx deleted the patch-1 branch January 9, 2016 16:12
@foxx
Copy link
Contributor Author

foxx commented Jan 9, 2016

No worries, sorry it took so long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants