A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://django-filter.readthedocs.io/en/main/dev/tests.html below:

Running the Test Suite - django-filter 25.1 documentation

Toggle table of contents sidebar

Running the Test Suite

The easiest way to run the django-filter tests is to check out the source code and create a virtualenv where you can install the test dependencies. Django-filter uses a custom test runner to configure the environment, so a wrapper script is available to set up and run the test suite.

Note

The following assumes you have virtualenv and git installed.

Clone the repository

Get the source code using the following command:

$ git clone https://github.com/carltongibson/django-filter.git

Switch to the django-filter directory:

Set up the virtualenv

Create a new virtualenv to run the test suite in:

Then activate the virtualenv and install the test requirements:

$ source venv/bin/activate
$ pip install -r requirements/test.txt
Execute the test runner

Run the tests with the runner script:

Test all supported versions

You can also use the excellent tox testing tool to run the tests against all supported versions of Python and Django. Install tox, and then simply run:

Housekeeping

The isort utility is used to maintain module imports. You can either test the module imports with the appropriate tox env, or with isort directly.

$ pip install tox
$ tox -e isort

# or

$ pip install isort
$ isort --check --diff django_filters tests

To sort the imports, simply remove the --check-only option.

$ isort --recursive django_filters tests

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4