bootstrapping test suite
For Pynie we're developing a bootstrapping test suite, which may be useful to other implementations as they migrate to 3.x. It uses Robert Collins' SubUnit, which decouples the testing framework from the tests. So the testing framework runs in CPython (or any reasonably complete Python 2.x implementation), while the tests run in Pynie. All that's required to pass the first test is an implementation of 'print' and string constants. The tests gradually build up in complexity through numeric constants, operators, control structures, functions, etc, and when we're done with them will walk all the way through to supporting the full Python 3.x syntax. When the bootstrap is complete, the test framework moves to Pynie too, integrated with the core CPython test suite. It might eventually be useful to add to the py3k branch, though I wouldn't include it in release tarballs. Or, if another repo is started for the benchmark tests, the bootstrapping tests might be added there. We'll contribute it to the PSF, anyway, so it's available. It does depend on SubUnit, which isn't part of the standard library. I can strip it down to a minimal subset of SubUnit's features and include them in the test running script if that makes it more generally useful. Right now the tests live in Lib/test/parrot in the Pynie repository, but will likely move to Lib/test/bootstrap (suggestions on Python-friendly naming welcome). Allison
On Sun, Apr 12, 2009 at 11:55 AM, Allison Randal <allison@parrot.org> wrote:
It might eventually be useful to add to the py3k branch, though I wouldn't include it in release tarballs. Or, if another repo is started for the benchmark tests, the bootstrapping tests might be added there. We'll contribute it to the PSF, anyway, so it's available. It does depend on SubUnit, which isn't part of the standard library. I can strip it down to a minimal subset of SubUnit's features and include them in the test running script if that makes it more generally useful.
I think including these in the common repository would be useful. We've been doing something similar for our LLVM backend, and I can think of at least one other infant Python implementation project that would benefit from this kind of thing. I imagine every new Python implementation goes through the phase of "well, we don't have enough working to use unittest.py, but we still want tests"; I'd like to save these projects the need to reinvent at least this particular wheel. Collin Winter
Allison Randal wrote:
For Pynie we're developing a bootstrapping test suite, which may be useful to other implementations as they migrate to 3.x. It uses Robert Collins' SubUnit, which decouples the testing framework from the tests. So the testing framework runs in CPython (or any reasonably complete Python 2.x implementation), while the tests run in Pynie. All that's required to pass the first test is an implementation of 'print' and string constants. The tests gradually build up in complexity through numeric constants, operators, control structures, functions, etc, and when we're done with them will walk all the way through to supporting the full Python 3.x syntax. When the bootstrap is complete, the test framework moves to Pynie too, integrated with the core CPython test suite.
Isn't Subunit GPL? That could be an issue for some projects. Michael
It might eventually be useful to add to the py3k branch, though I wouldn't include it in release tarballs. Or, if another repo is started for the benchmark tests, the bootstrapping tests might be added there. We'll contribute it to the PSF, anyway, so it's available. It does depend on SubUnit, which isn't part of the standard library. I can strip it down to a minimal subset of SubUnit's features and include them in the test running script if that makes it more generally useful.
Right now the tests live in Lib/test/parrot in the Pynie repository, but will likely move to Lib/test/bootstrap (suggestions on Python-friendly naming welcome).
Allison _______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
Michael Foord wrote:
Isn't Subunit GPL? That could be an issue for some projects.
Aye, but the bootstrapping tests are just simple python 3 files that print "success" or "failure" to stdout, and would be licensed under whatever license the PSF chooses (presumably the PSF license). Any test framework can run the tests without SubUnit. (The test framework and tests are completely decoupled.) I'm using SubUnit to link them into the CPython test suite. Allison
participants (3)
-
Allison Randal
-
Collin Winter
-
Michael Foord