mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Added a tox.ini and updated the travis config to work with tox
This commit is contained in:
parent
635d0550d9
commit
78c73d5b01
4 changed files with 40 additions and 14 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -14,3 +14,4 @@ MANIFEST
|
|||
dist/
|
||||
.venv
|
||||
example/media/
|
||||
.tox/
|
||||
|
|
|
|||
33
.travis.yml
33
.travis.yml
|
|
@ -1,16 +1,23 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
env:
|
||||
- DJANGO_VERSION=1.6.11
|
||||
- DJANGO_VERSION=1.7.7
|
||||
- DJANGO_VERSION=1.8
|
||||
install:
|
||||
- pip install Django==$DJANGO_VERSION
|
||||
- pip install -e .
|
||||
- pip install South
|
||||
script:
|
||||
- ./example/manage.py test categories --settings='settings-testing'
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- master
|
||||
|
||||
env:
|
||||
- TOXENV=py27-django18
|
||||
- TOXENV=py27-django19
|
||||
- TOXENV=py34-django18
|
||||
- TOXENV=py34-django19
|
||||
- TOXENV=py35-django18
|
||||
- TOXENV=py35-django19
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
||||
script:
|
||||
- tox -e $TOXENV
|
||||
|
||||
after_success:
|
||||
- pip install codecov
|
||||
- codecov -e TOXENV
|
||||
|
|
|
|||
|
|
@ -3,12 +3,16 @@
|
|||
# test mixed
|
||||
import os
|
||||
|
||||
from django.test import TestCase
|
||||
from django.conf import settings
|
||||
from django.test import TestCase, override_settings
|
||||
from categories.models import Category
|
||||
from categories.management.commands.import_categories import Command
|
||||
from django.core.management.base import CommandError
|
||||
|
||||
from categories.registration import _process_registry, registry
|
||||
|
||||
|
||||
@override_settings(INSTALLED_APPS=(app for app in settings.INSTALLED_APPS if app != 'django.contrib.flatpages'))
|
||||
class CategoryImportTest(TestCase):
|
||||
def setUp(self):
|
||||
pass
|
||||
|
|
|
|||
14
tox.ini
Normal file
14
tox.ini
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[tox]
|
||||
envlist =
|
||||
py27-django{18,19},
|
||||
py34-django{18,19},
|
||||
py35-django{18,19},
|
||||
|
||||
[testenv]
|
||||
deps=
|
||||
django19: Django==1.9.2
|
||||
django18: Django==1.8.9
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
||||
commands=
|
||||
{toxinidir}/example/manage.py test --settings='settings-testing' categories
|
||||
Loading…
Reference in a new issue