Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
language: python
sudo: false
dist: trusty
cache: pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
env:
matrix:
- DJANGO="Django<1.9,>=1.8"
- DJANGO="Django<1.10,>=1.9"
- DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
- TOXENV=qa
- DJANGO=18
- DJANGO=19
- DJANGO=110
- DJANGO=master
matrix:
fast_finish: true
allow_failures:
- env: DJANGO="-e git+https://github.com/django/django.git@master#egg=Django"
- env: DJANGO=master
install:
- pip install --upgrade pip
- pip install -r requirements-dev.txt
- pip install $DJANGO
- pip install --upgrade coveralls
- pip install --upgrade pip tox
- pip install -U coveralls
before_script:
- |
if [[ -z $TOXENV ]]; then
export TOXENV=py$(echo $TRAVIS_PYTHON_VERSION | sed -e 's/\.//g')-dj$DJANGO
fi
- echo $TOXENV
script:
- isort --check-only --recursive --diff .
- flake8 --jobs=2 .
- pep257 --verbose --explain --source --count stdimage
- coverage run --source=stdimage -m 'pytest'
- tox -e $TOXENV
after_success:
- coveralls
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ pep8-naming==0.4.1
pre-commit==0.9.4
py==1.4.32
pytest==3.0.5
pytest-django==3.1.2
tox==2.5.0
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[pytest]
[tool:pytest]
norecursedirs=venv env
DJANGO_SETTINGS_MODULE=tests.settings
addopts = --tb=short -rxs
addopts = --tb=short -rxs --nomigrations

[flake8]
max-line-length = 79
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
'Programming Language :: Python',
'Topic :: Software Development',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
Expand Down
20 changes: 0 additions & 20 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
import io
import os

import pytest
from django import conf
from django.core.files.uploadedfile import SimpleUploadedFile
from PIL import Image


def pytest_configure():
os.environ[conf.ENVIRONMENT_VARIABLE] = "tests.settings"

try:
import django
django.setup()
except AttributeError:
pass

from django.test.utils import setup_test_environment

setup_test_environment()

from django.db import connection

connection.creation.create_test_db()


@pytest.fixture
def imagedata():
img = Image.new('RGB', (250, 250), (255, 55, 255))
Expand Down
Loading