[Python-Dev] PEP 380 acceptance (was Re: EuroPython Language Summit report) (original) (raw)

renaud rndblnch at gmail.com
Wed Jun 29 02:34:59 CEST 2011


Nick Coghlan <ncoghlan gmail.com> writes:

On Tue, Jun 28, 2011 at 1:09 AM, renaud <rndblnch gmail.com> wrote: > Nick Coghlan <ncoghlan gmail.com> writes: > >> I hit a snag with this. The real tests of the PEP 380 functionality >> aren't currently part of the patch - they're a big set of "golden >> output" tests in the zipfile hosted on Greg's site. Those need to be >> refactored into proper unittest or doctest based additions to the test >> suite and incorporated into the patch before I could commit this with >> a clear conscience. > > let me know if i can help. It would be good if you could take a look at Greg's original test suite, consider ways of bringing it into the main regression tests and then update the patch queue on bitbucket accordingly. My preference is for something unittest based, essentially taking the "golden output" comparisons and turning them into appropriate self.assert* invocations. Given the number of tests Greg has, it will probably make more sense to do it as a new test subdirectory rather than as a single test file (although that depends on how many tests are in each file - if there are only a few, or if they overlap a lot, then having them as separate test cases within a single file may be a better choice).

ok, i've generated a single test_pep380.py using greg tests wrapped to be run by unittest. it's ugly, but it does the job. some things that may not be desirable:

the whole thing is available here: <https://bitbucket.org/rndblnch/cpython-pep380/src/tip/pep380-tests>

renaud

ps. i had to edit the test24 (Test parser module) expected output to make it match the actual output, i guess that the parser module has changed since greg wrote the tests.



More information about the Python-Dev mailing list