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.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

django_list_tests-0.1.1-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.1.tar.gz.

File metadata

  • Download URL: django-list-tests-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ee619bf6dafe246c0b368a7963d868fd32160fd35117df474d390216832dbf49
MD5 537e0dfee013b87d92f1b5b432b3e7ca
BLAKE2b-256 52f56d8de6fcc4c4148c76e9291a3c4c8fa520a1f7a9ab74122b6adb223a24b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_list_tests-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 62794b0c43dc262cae0bda032126925472e7b96734a8148c7f26872a5d25fef5
MD5 96118c476c15dcc35fa2aabff1fb805a
BLAKE2b-256 8465d71aaba1c1e17b697ad0a824fdb9822e88b9942e01223c948c867bc45d10

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