You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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:
@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.
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
andLANG
/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
The text was updated successfully, but these errors were encountered: