Skip to main content

Add a django management command to list all tests in the project

Project description

Add a django management command to list all tests in the project


Install django-list-tests:

pip install django-list-tests

Add it to your INSTALLED_APPS:


And run:

./ list_tests <app_name>

You can use this command for fzf completion of tests:

function tz() {
    # cache the test names to speed things up. you can go more complex with
    # watchman or whatever.
    if [[ ! -f '.test_names' ]]; then
        python $DJANGO_MANAGE_SCRIPT list_tests $DJANGO_ROOT_MODULE > ./.test_names

    TESTS=$( cat .test_names | fzf )

    echo Runnning "$TESTS"
    python "$DJANGO_MANAGE_SCRIPT" "test" --keepdb "$TESTS"

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 django-list-tests, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size django_list_tests-0.1.2-py2.py3-none-any.whl (3.3 kB) File type Wheel Python version 3.6 Upload date Hashes View hashes
Filename, size django-list-tests-0.1.2.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page