Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 24788a79727b2865c2ebb171420cb530 > files > 466

python-zope-testing-3.9.5-6.fc13.noarch.rpm

Debugging Memory Leaks without a debug build of Python 
======================================================

To use the --report-refcounts (-r) to detect or debug memory leaks,
you must have a debug build of Python. Without a debug build, you will
get an error message:

    >>> import os.path, sys
    >>> directory_with_tests = os.path.join(this_directory, 'testrunner-ex')
    >>> defaults = [
    ...     '--path', directory_with_tests,
    ...     '--tests-pattern', '^sampletestsf?$',
    ...     ]

    >>> from zope.testing import testrunner
    
    >>> sys.argv = 'test -r -N6'.split()
    >>> _ = testrunner.run_internal(defaults)
            The Python you are running was not configured
            with --with-pydebug. This is required to use
            the --report-refcounts option.
    <BLANKLINE>