Skip to content

better document that -s (capture=no) doesn't work with xdist #296

New issue

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

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

Already on GitHub? # to your account

Closed
valignatev opened this issue May 29, 2018 · 6 comments · Fixed by #666
Closed

better document that -s (capture=no) doesn't work with xdist #296

valignatev opened this issue May 29, 2018 · 6 comments · Fixed by #666

Comments

@valignatev
Copy link

Hi, I want to print some info in stdout, so I use -s pytest option. It works fine unless I also use xdist with something like -n 2. In this case, logs got captured and I don't see anything.
Am I missing something?

@RonnyPfannschmidt
Copy link
Member

-s doesn't work with xdist and gets disabled

@valignatev
Copy link
Author

Thanks for the answer, probably this should be somewhere in the docs.
For now, I use this workaround in my test:
assert False, 'Info I need'

@RonnyPfannschmidt RonnyPfannschmidt changed the title -s (capture=no) doesn't work with xdist better document that -s (capture=no) doesn't work with xdist May 29, 2018
@valignatev
Copy link
Author

What would be a good place to put it? Maybe the second entry in the FAQ section?

@RonnyPfannschmidt
Copy link
Member

i think so

@valignatev
Copy link
Author

Also, I've noticed that -s is used in examples:

py.test -s -v \

And in tests:
result = testdir.runpytest("-n1", "-s")

Should we remove it or it's somehow intended (then it looks misleading)?

@Akuli
Copy link

Akuli commented Aug 30, 2018

Is there really no way to pass --capture=no to tests? It feels like a huge 👎 to me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants