Skip to main content

Nose plugin for counting queries in Django tests

Project description

Nose Django Querycount Plugin

Counts queries for each test and shows result in the end in table. XML otput
and other fancy stuff will be added later.

From the source repository:

$ pip install git+git://

From PyPI:

$ pip install nose-django-querycount


Currently only nose is supported, but native Django runner support is planned.
Run like following:

$ nosetests --with-querycount

Alternatively, if you use [django-nose][], add it to your Django settings
like so:

NOSE_ARGS = ['--with-querycount']


$ nosetests --with-querycount --querycount-threshold=15

Provides query count threshold for each test. If test run exceeds 15 queries,
query count number will be red. Works only for terminal output and only if
your terminal application supports coloring.


**This plugin sets DEBUG=True for tests, it can break your existing tests!**

Django test runner sets DEBUG to False when when running test, but Django
saves query log only when DEBUG mode is enabled.


Project details

Download files

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

Files for nose-django-querycount, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size nose-django-querycount-0.3.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

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