Test environment for debugging a Python memory problem