Created
May 10, 2015 14:11
-
-
Save asfaltboy/08d0ac84563b53ffed3c to your computer and use it in GitHub Desktop.
tox django env matrix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from django.conf import settings | |
import django | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.tests.test_settings' | |
try: | |
from django.test.utils import get_runner | |
TestRunner = get_runner(settings) | |
test_runner = TestRunner() | |
except ImportError: | |
from django.test.simple import DjangoTestSuiteRunner | |
test_runner = DjangoTestSuiteRunner(verbosity=1, interactive=False) | |
try: | |
django.setup() | |
except AttributeError: | |
pass | |
failures = test_runner.run_tests(['app'], verbosity=1) | |
if failures: | |
sys.exit(failures) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tox (http://tox.testrun.org/) is a tool for running tests | |
# in multiple virtualenvs. This configuration file will run the | |
# test suite on all supported python versions. To use it, "pip install tox" | |
# and then run "tox" from this directory. | |
[tox] | |
envlist = | |
{py26,py27}-django{14,15,16}, | |
{py33}-django{15,16,17,18}, | |
{py27,py34}-django{17,18}, | |
[testenv] | |
deps = | |
django13: Django>=1.3,<1.4 | |
django14: Django>=1.4,<1.5 | |
django15: Django>=1.5,<1.6 | |
django16: Django>=1.6,<1.7 | |
django17: Django>=1.7,<1.8 | |
django18: Django>=1.8,<1.9 | |
commands = {envpython} runtests.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment