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

pytest-icdiff causes hangs when terminal width is zero #33

Open
jclerman opened this issue Jan 12, 2023 · 2 comments
Open

pytest-icdiff causes hangs when terminal width is zero #33

jclerman opened this issue Jan 12, 2023 · 2 comments

Comments

@jclerman
Copy link

I have found that in certain CI environments (CircleCI), terminal width is reported as zero, which seems to cause pytest-icdiff to hang (stops producing output and does not exit) when pytest finds an error. I don't have a compact reproducible example unfortunately (I can experiment with trying to make one), but hopefully it'll be helpful to have this report nonetheless (it took quite a while to sleuth out this much).

The problem occurs with pytest 7.1.3 and 7.2.0, under python 3.8.15 and python 3.9.10 (I haven't tested with other combinations). It occurs with pytest-icdiff 0.5 and 0.6.

The problem can be avoided by running stty rows 50 cols 120 before starting pytest but one has to know to do that.

@PeterNerlich
Copy link
Contributor

It would be helpful to add --cols to the list of possible arguments since the CI environment won't know a useful width anyway, maybe along with a few other arguments icdiff has. Currently, the default behaviour is simply hardwired, while icdiff is more flexible than that.

@hjwp
Copy link
Owner

hjwp commented Feb 2, 2023

thanks very much for reporting! even if i don't get round to fixing it immediately, at least people might be able to google the problem now and find your suggested workaround. much appreciated.

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

No branches or pull requests

3 participants