A base framework to write a simple runtests.py script for django apps.
Project description
Eases the writing of a runtests.py script for pluggable django application.
Such scripts usually provide a runtests() method that handle the test running behaviour.
Installation
Globally:
$ pip install django-runtests
From the package’s setup.py file (using Distribute):
setup( test_requires=[ 'django-runtests', ], test_suite='runtests.runtests', )
Defining the test setup
In your runtests.py file, add the following code:
import django_runtests class Tests(django_runtests.RunTests): TESTED_APPS = ['my.app.to.test', 'my.other.test'] EXTRA_APPS = [ 'django.contrib.auth', # Other custom apps to include ] EXTRA_SETTINGS = { # Custom settings, as a dict } def runtests(): return Tests.runtests() if __name__ == '__main__': Tests.main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django_runtests-0.2.0.tar.gz
(9.9 kB
view details)
File details
Details for the file django_runtests-0.2.0.tar.gz
.
File metadata
- Download URL: django_runtests-0.2.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e848cc69bdd64119adf9011cd0f9d5ec7277557d433f7a253f6efc1c2c084311 |
|
MD5 | 69b00748ceef0c90587b749ff0b3df19 |
|
BLAKE2b-256 | 768620a83cc8615726bc13e8429925805e920fbb8d95c61eea747224664a27b9 |