mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
Merge branch 'ik3-testing-fixes' into ik-next
This commit is contained in:
commit
80a1f0b4ee
5 changed files with 34 additions and 16 deletions
|
|
@ -2,6 +2,6 @@ language: python
|
|||
python:
|
||||
- 2.7
|
||||
install: pip install tox --use-mirrors
|
||||
script: tox -e py27-django13,py27-django12,py26-django13,py27-django12
|
||||
script: tox
|
||||
notifications:
|
||||
irc: "irc.freenode.org#imagekit"
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -1,7 +0,0 @@
|
|||
test:
|
||||
flake8 --ignore=E501,E126,E127,E128 imagekit tests
|
||||
export PYTHONPATH=$(PWD):$(PYTHONPATH); \
|
||||
django-admin.py test --settings=tests.settings tests
|
||||
|
||||
|
||||
.PHONY: test
|
||||
14
setup.py
14
setup.py
|
|
@ -1,21 +1,31 @@
|
|||
#/usr/bin/env python
|
||||
import codecs
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
import sys
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
# Workaround for multiprocessing/nose issue. See http://bugs.python.org/msg170215
|
||||
try:
|
||||
import multiprocessing
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
if 'publish' in sys.argv:
|
||||
os.system('python setup.py sdist upload')
|
||||
sys.exit()
|
||||
|
||||
|
||||
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
|
||||
|
||||
|
||||
# Load package meta from the pkgmeta module without loading imagekit.
|
||||
pkgmeta = {}
|
||||
execfile(os.path.join(os.path.dirname(__file__),
|
||||
'imagekit', 'pkgmeta.py'), pkgmeta)
|
||||
|
||||
|
||||
setup(
|
||||
name='django-imagekit',
|
||||
version=pkgmeta['__version__'],
|
||||
|
|
@ -35,7 +45,9 @@ setup(
|
|||
'nose==1.2.1',
|
||||
'nose-progressive==1.3',
|
||||
'django-nose==1.1',
|
||||
'Pillow==1.7.8',
|
||||
],
|
||||
test_suite='testrunner.run_tests',
|
||||
install_requires=[
|
||||
'django-appconf>=0.5',
|
||||
],
|
||||
|
|
|
|||
19
testrunner.py
Normal file
19
testrunner.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# A wrapper for Django's test runner.
|
||||
# See http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/
|
||||
# and http://gremu.net/blog/2010/enable-setuppy-test-your-django-apps/
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
|
||||
test_dir = os.path.dirname(__file__)
|
||||
sys.path.insert(0, test_dir)
|
||||
|
||||
from django.test.utils import get_runner
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def run_tests():
|
||||
cls = get_runner(settings)
|
||||
runner = cls()
|
||||
failures = runner.run_tests(['tests'])
|
||||
sys.exit(failures)
|
||||
8
tox.ini
8
tox.ini
|
|
@ -4,40 +4,34 @@ envlist =
|
|||
py26-django14, py26-django13, py26-django12
|
||||
|
||||
[testenv]
|
||||
commands = make test
|
||||
commands = python setup.py test
|
||||
|
||||
[testenv:py27-django14]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
Django>=1.4,<1.5
|
||||
Pillow
|
||||
|
||||
[testenv:py27-django13]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
Django>=1.3,<1.4
|
||||
Pillow
|
||||
|
||||
[testenv:py27-django12]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
Django>=1.2,<1.3
|
||||
Pillow
|
||||
|
||||
[testenv:py26-django14]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
Django>=1.4,<1.5
|
||||
Pillow
|
||||
|
||||
[testenv:py26-django13]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
Django>=1.3,<1.4
|
||||
Pillow
|
||||
|
||||
[testenv:py26-django12]
|
||||
basepython = python2.6
|
||||
deps =
|
||||
Django>=1.2,<1.3
|
||||
Pillow
|
||||
|
|
|
|||
Loading…
Reference in a new issue