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

Expand unit testing around termui, especially getchar #1116

Open
sirosen opened this issue Sep 19, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@sirosen
Copy link
Contributor

commented Sep 19, 2018

#1115, #583, and a couple of other issues seem to show that there are some subtle cases to handle in click.getchar.
But these are hard to test and therefore, presently, untested. I wouldn't be surprised to find other gaps in testing of termui.

I think it would be nice to have some more testing around the termui module, limited to what we can do safely and definitely correctly -- e.g. feed getchar a u'\x04' and make sure it raises an exception.

The best way to tackle this is probably to start writing more tests and see what's needed and possible.
I'd like to step up and do it myself, but if someone else has the cycles they should feel more than welcome.

@jcrotts jcrotts added the enhancement label Oct 20, 2018

@icreatedanaccount

This comment has been minimized.

Copy link

commented May 8, 2019

Taking a stab at it

@icreatedanaccount

This comment has been minimized.

Copy link

commented May 9, 2019

I am able to expand the coverage by about 15% and test the win-specific version of getchar as I develop on Windows. How do you suggest we go about the Linux half (keep the issue open, new one, etc.) ? @sirosen

@sirosen

This comment has been minimized.

Copy link
Contributor Author

commented May 10, 2019

My big worry was about Windows coverage. For the issues I mentioned, I was firing up Windows VMs and poking and prodding at it, without any kind of tests as a safety net.

I would say that #1315 closes this. At a glance it seems fine/good, but I want to do a more careful read after work before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.