From d53d0a307c10efb05ce0de82ab690c94c5deb5a4 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Sun, 21 Sep 2014 13:39:48 +0200 Subject: [PATCH 1/1] Move unit tests out of the app. Add tox configuration (tox 1.8 needed), fix requirements and package discovery in setup.py. --- .gitignore | 3 ++ cas_provider_examples/manage.py | 0 cas_provider_examples/simple/models.py | 0 cas_provider_examples/simple/settings.py | 1 + .../simple}/tests.py | 0 setup.py | 8 +++-- tox.ini | 30 +++++++++++++++++++ 7 files changed, 39 insertions(+), 3 deletions(-) mode change 100644 => 100755 cas_provider_examples/manage.py create mode 100644 cas_provider_examples/simple/models.py rename {cas_provider => cas_provider_examples/simple}/tests.py (100%) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 2bed7fd..e95e92d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ *.egg-info /build /dist +.tox +.coverage +htmlcov # Mac OS X garbage .DS_Store diff --git a/cas_provider_examples/manage.py b/cas_provider_examples/manage.py old mode 100644 new mode 100755 diff --git a/cas_provider_examples/simple/models.py b/cas_provider_examples/simple/models.py new file mode 100644 index 0000000..e69de29 diff --git a/cas_provider_examples/simple/settings.py b/cas_provider_examples/simple/settings.py index 1896e81..679863a 100644 --- a/cas_provider_examples/simple/settings.py +++ b/cas_provider_examples/simple/settings.py @@ -116,6 +116,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'cas_provider', + 'simple', ) # A sample logging configuration. The only tangible logging diff --git a/cas_provider/tests.py b/cas_provider_examples/simple/tests.py similarity index 100% rename from cas_provider/tests.py rename to cas_provider_examples/simple/tests.py diff --git a/setup.py b/setup.py index fe96615..40effde 100644 --- a/setup.py +++ b/setup.py @@ -11,13 +11,15 @@ setup( author='(Chris Williams), Sebastian Annies', author_email='(chris@nitron.org), sebastian.annies@googlemail.com', url='https://github.com/castlabs/django-cas-provider', - packages=find_packages(), + packages=find_packages(exclude=['cas_provider_examples']), include_package_data=True, license='MIT', long_description=read('README.rst'), zip_safe=False, - install_requires=['setuptools', - 'south>=0.7.2',], + install_requires=[ + 'Django>=1.5,<1.8', + 'lxml', + ], classifiers = [ "Development Status :: 3 - Alpha", "Framework :: Django", diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..c11d95d --- /dev/null +++ b/tox.ini @@ -0,0 +1,30 @@ +[tox] +envlist=clear, + d1{5,6}-py{26,27,32,33}, + d{17,d}-py{27,32,33,34}, + stats + +[testenv] +indexserver=https://py.mdrn.pl:8443 +commands=coverage run --source=cas_provider --append --branch cas_provider_examples/manage.py test simple +deps= + d15: Django>=1.5,<1.6 + d16: Django>=1.6,<1.7 + d17: Django>=1.7,<1.8 + dd: https://github.com/django/django/zipball/master + coverage +basepython= + py26: python2.6 + py27: python2.7 + py32: python3.2 + py33: python3.3 + py34: python3.4 + +[testenv:clear] +basepython=python3.4 +commands=coverage erase + +[testenv:stats] +basepython=python3.4 +commands=coverage html + -- 2.20.1