New submission from Greg Malcolm <g...@gregmalcolm.com>: 'keyword.py' didn't have any tests, so I wrote some.
Most of the tests are are for the main() method, which self-populates the keywords section of keyword.py with keywords taken from a grammar file, 'Python/graminit.c'. The main() method allows you to choose the grammar file and the target file, so I've written the tests such that the actual keyword.py does not have to modify itself. Most of the tests generate dummy keyword.py and graminit.c files for parsing. They are all deleted in the tearUp() stages of each test. I've timed the tests. In total they take approximately 3 seconds so you may want to tag some of them as "slow". Also I've only tested on the mac, so someone may want to check it runs ok on Windows. Most of the patch was written at the PyOhio 2010 Sprints. Thanks go to David Murray for advice given while working on it. ---------- components: Tests files: test_keyword.patch keywords: patch messages: 113942 nosy: gregmalcolm, r.david.murray priority: normal severity: normal status: open title: Test file 'test_keyword.py' submission for use with keyword.py type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18537/test_keyword.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9607> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com