On 8/10/07, Nick Coghlan <[EMAIL PROTECTED]> wrote: > However we select between Python and native module versions, the build > bots need be set up to run the modules both ways (with and without C > optimisation).
That is trivial to do without any runtime flags. For example for testing both the C and Python implementations of StringIO (and BytesIO), I define the Python implementation with a leading underscore and rename it if the C implementation is available: class _StringIO(TextIOWrapper): ... # Use the faster implementation of StringIO if available try: from _stringio import StringIO except ImportError: StringIO = _StringIO With this way, the Python implementation remains available for testing (or debugging). For testing the modules, I first check if the C implementation is available, then define the test according to that -- just check out by yourself: http://svn.python.org/view/python/branches/cpy_merge/Lib/test/test_memoryio.py?rev=56445&view=markup -- Alexandre _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com