1
Debugging Memory Leaks without a debug build of Python
2
======================================================
4
To use the --report-refcounts (-r) to detect or debug memory leaks,
5
you must have a debug build of Python. Without a debug build, you will
8
>>> import os.path, sys
9
>>> directory_with_tests = os.path.join(this_directory, 'testrunner-ex')
11
... '--path', directory_with_tests,
12
... '--tests-pattern', '^sampletestsf?$',
15
>>> from zope.testing import testrunner
17
>>> sys.argv = 'test -r -N6'.split()
18
>>> _ = testrunner.run_internal(defaults)
19
The Python you are running was not configured
20
with --with-pydebug. This is required to use
21
the --report-refcounts option.