Skip to main content

The garbage collector plugin for py.test

Project description

The garbage collector plugin for py.test.


Install the plugin with:

$ pip install pytest-gc


There are a few options to use this plugin:

  • Disable automatic garbage collection when running tests with gc-disable.
  • Set the garbage collection thresholds using gc-threshold option.
  • Also, set the scope for the plugin’s fixtures with gc-scope, default function.

So, for example, if you wanna change the gc thresholds for test run, just type:

$ pytest --gc-threshold 5 7 8 --gc-scope session


The repository of this plugin is at

For more info on py.test see

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-gc-0.0.1.tar.gz (2.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page