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

Real stdin testing #17

Open
jayvdb opened this issue Jul 31, 2019 · 1 comment
Open

Real stdin testing #17

jayvdb opened this issue Jul 31, 2019 · 1 comment

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Jul 31, 2019

In addition to the mock-ish stdin testing already merged, this needs very real tests of the python runtime, to cover real scenarios like various PYTHONIOENCODING and LANG/etc settings.

Ideally #15 is done first, as the stranger real situations are typically on Windows.

fwiw, I've set up a rig to do this a long time ago for https://github.com/wikimedia/pywikibot.

The approach we took was to have very simple programs which printed out inputs. Then those programs are run with popen, and the output was checked to assert it was correct for a variety of inputs. The sample programs are fairly easy to understand:

https://github.com/wikimedia/pywikibot/tree/master/tests/pwb

The tests are harder to grapple with, and are unlikely to be copy-able, but maybe will be helpful to identify scenarios that need to be tested. Some/most? are in:

https://github.com/wikimedia/pywikibot/blob/master/tests/pwb_tests.py

@jayvdb
Copy link
Contributor Author

jayvdb commented Jul 31, 2019

@timrburnham, iirc you said somewhere that you had started on this. IMO this can be delayed until after a release. I think we have a fairly good set of features and asserts atm - a solid foundation.

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

1 participant