colorama icon indicating copy to clipboard operation
colorama copied to clipboard

tests are failing on macos/iterm/zsh with AssertionError: stdout should not be wrapped

Open ssbarnea opened this issue 6 years ago • 3 comments

I tried to run tox on colorama on MacOS with iTerm and zsh and I got multiple failures looking like:

Full log at https://gist.github.com/ssbarnea/30127add6646aaca448be876c7b51edd

There are two aspects regarding this:

  • why it fails (apparently colorama works well)
  • how to assure that the CI (Travis) would test this so we can avoid passing CI in cases like this?

ssbarnea avatar Jun 05 '18 08:06 ssbarnea

Hmm. The tests have to be run with -s in order to work (the README specifies this, but says it's only relevant for nosetests). Adding -s to tox.ini fixes this problem. I wonder how we missed this. Thanks for reporting this.

wiggin15 avatar Jun 14 '18 09:06 wiggin15

I think I'll move tox to use the same command we use in the Makefile and in .travis.yaml. This will disable the coverage option, though.

wiggin15 avatar Jun 14 '18 09:06 wiggin15

Even with -s, tests fail if stdout isn't a TTY (easily reproduced, for instance with pytest -s | cat). Is there a workaround? EDIT: found one: script -eqc "pytest -s" /dev/null works as expected and can be piped to anything.

sbraz avatar Aug 20 '18 22:08 sbraz