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

Quickstart

Install django-list-tests:

pip install django-list-tests

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_list_tests',
    ...
)

And run:

./manage.py list_tests <app_name>

You can use this command for fzf completion of tests:

# FZF ALL DAY ERRY DAY
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
    fi

    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.

Source Distribution

django-list-tests-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

django_list_tests-0.1.2-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-list-tests-0.1.2.tar.gz.

File metadata

  • Download URL: django-list-tests-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for django-list-tests-0.1.2.tar.gz
Algorithm Hash digest
SHA256 33e7d7af9388af7e7c4ba06b9368f8eb0f73cbd94a2e11b7c5135a5d6cf85e82
MD5 9e20c97468d292554a05c1ac3e66fd5b
BLAKE2b-256 eb608661216813e0411335f4d315ed9a1cb018774b72e1deac9d19e3074fa03c

See more details on using hashes here.

File details

Details for the file django_list_tests-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_list_tests-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 25bd3c0c7f4e0dfb40f913b841416a9ea1ef1fa5c021ca4c7643fbbf2b78cf7a
MD5 bb99fda7efa200ec735ce1f0b4c0d693
BLAKE2b-256 cd1e19258b97672757cad3a8146e0967ec44e7f9405fd8fa5b933b2c54c66d3e

See more details on using hashes here.

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