[Python-Dev] testing with and without pyc files present
Guido van Rossum
guido@python.org
Tue, 06 May 2003 12:04:20 -0400
> The test targets in the Makefile first delete any .py[co] files, then run
> the test suite twice. I know there must be a reason for this, but isn't
> there a less sledgehammer-like and more explicit way to test whatever this
> is trying to test?
In the past, we've had problems where bugs in the marshalling or
elsewhere caused bytecode read from .pyc files to behave differently
than bytecode generated directly from a .py source file. Sometimes
the bytecode read from a .pyc file had the bug, somtimes the directly
generated bytecode. This is sometimes a very shy bug needing a lot of
sample data. How else would you propose to test this?
--Guido van Rossum (home page: http://www.python.org/~guido/)