Skip to content
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

output capture and doctest dont work together #86

Closed
pytestbot opened this issue Oct 30, 2011 · 3 comments
Closed

output capture and doctest dont work together #86

pytestbot opened this issue Oct 30, 2011 · 3 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt)


when output captureing is enabled, doctest will print to stdout instead of capturing stuff by itself

$ py.test -s
========================================== test session starts ===========================================
platform linux2 -- Python 2.7.2 -- pytest-2.1.3
collected 1 items 

test_foo.txt .

======================================== 1 passed in 0.04 seconds ========================================


$ py.test   
========================================== test session starts ===========================================
platform linux2 -- Python 2.7.2 -- pytest-2.1.3
collected 1 items 

test_foo.txt 2
F

================================================ FAILURES ================================================
_______________________________________________ [doctest] ________________________________________________
001 >>> 2
Expected:
    2
Got nothing

/home/ronny/test/test_foo.txt:1: DocTestFailure
======================================== 1 failed in 0.05 seconds ========================================

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Do you happen to have a fix?

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


so far no, i haven't been able to figure the cause yet

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


i seems the breakage comes from a stangeness in the python environment

i couldn't figure what exactly was wrong

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
mgorny pushed a commit to mgorny/pytest that referenced this issue May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant