Skip to main content

HotRunner is a Django test runner with useful features, like excluding apps and displaying running times of individual tests.

Project description

HotRunner is an improved django test runner.

To use HotRunner, simply set TEST_RUNNER = 'hotrunner.HotRunner' in your django settings file. This enables two useful features:

  • Test exclusion: None of the django.contrib tests will be run when you run your test suite. Neither will any apps you specify in the EXCLUDED_TEST_APPS setting. You can override this without deleting your EXLUDED_TEST_APPS, by setting TEST_ALL_APPS to a true value. django.contrib apps will still not be run. To run them, specify them by name on the manage.py command line: python manage.py test django.contrib.auth

  • Test timing: Find out how long each test is running simply by setting your verbosity to 2 or higher. The time it takes to run each successful test will be reported at microsecond granularity:

    $ python manage.py test --verbosity
    test_absolute_url (news.tests.NewsModelAbsoluteURLTestCase) ... (1.103603s) ok
    test_empty_body_returns_empty_html (news.tests.NewsModelMarkdownTestCase) ... (0.000215s) ok
    test_markdown_saved_to_html (news.tests.NewsModelMarkdownTestCase) ... (0.014008s) ok
    test_unicode_markdown_converted_appropriately (news.tests.NewsModelMarkdownTestCase) ... (0.000803s) ok
    test_unicode_strings_must_be_decoded (news.tests.NewsModelMarkdownTestCase) ... (0.000683s) ok
    test_basic_slug_creation (news.tests.NewsModelSlugificationTestCase) ... (0.001656s) ok
    test_existing_slugs_do_not_get_overridden (news.tests.NewsModelSlugificationTestCase) ... (0.000307s) ok
    test_slugifying_disambiguates_slugs (news.tests.NewsModelSlugificationTestCase) ... ERROR

    Tests that fail or error will not report time, as the information is not necessarily relevant if the test is not behaving properly.

Dependencies

HotRunner is built for integration with Django as a replacement for its custom test runner. It builds on functionality in unittest2, so it only works with Django 1.3 or higher.

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

django-hotrunner-0.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page