From 52586c7191b3bd17048c7d455584d67a222d6fe7 Mon Sep 17 00:00:00 2001 From: Mykhailo Kolesnyk Date: Fri, 15 Jan 2016 14:04:30 +0200 Subject: [PATCH] Fix documentation wrt tests and supported versions * use stricter Django verison in setup.py * fix tox arguments passing * update docs --- README.rst | 10 +++------- docs/running_tests.rst | 23 +++++++---------------- setup.py | 7 +------ tox.ini | 2 +- 4 files changed, 12 insertions(+), 30 deletions(-) diff --git a/README.rst b/README.rst index cea4e2f34..c6b47af04 100644 --- a/README.rst +++ b/README.rst @@ -43,6 +43,7 @@ through the `setup.py`. Here are the most important of them:: Django | django-polymorphic | django-mptt ------ | ------------------ | ----------- + 1.5 | >=0.4.1 | >=0.6,<0.8 1.6 | >=0.5.4, | >=0.6,<0.8 1.7 | >=0.5.6 | >=0.6,<0.8 1.8 | >=0.7 | >=0.7 @@ -71,19 +72,14 @@ See the docs for advanced configuration: Django <1.7 and South --------------------- -Django 1.7 is supported together with the new migrations. For Django<1.7 South +Django 1.7+ is supported together with the new migrations. For Django<1.7 South is still supported, you need at least South>=1.0 for South to find them though. Testsuite --------- -The easiest way to run the testsuite is to checkout the code, make sure you have ``PIL`` installed, and run:: - - python setup.py test - - -For serious testing ``tox`` is recommended. See documentation for details. +For testing ``tox`` is required. See documentation for details. Development front-end diff --git a/docs/running_tests.rst b/docs/running_tests.rst index ca4274142..c92602215 100644 --- a/docs/running_tests.rst +++ b/docs/running_tests.rst @@ -6,16 +6,7 @@ Running tests django-filer is continuously being tested on `travis-ci `_. -The simplest way to run the testsuite locally is to checkout the sourcecode, make sure you have ``Pillow`` installed and -run:: - - python setup.py test - - -It is also possible to invoke the test script directly. Just make sure the test dependencies have been installed:: - - runtests.py - +There is no easy way to run test suite on any python version you have installed without using ``tox``. The recommended way to test locally is with `tox `_. Once ``tox`` is installed, simply running the ``tox`` command inside the package root. You don't need to bother with any virtualenvs, it will be @@ -23,12 +14,12 @@ done for you. Tox will setup multiple virtual environments with different python # run all tests in all default environments tox - # run testsuite with django-dev/python 2.7 and django-1.4/python 2.6 - tox -e py27-django-dev,py26-django14 - # run a specific testcase in all environemnts - tox -- filer.FilerApiTests.test_create_folder_structure - # run a test class in specific environments - tox -e py27-django-dev,py26-django14 -- filer.FilerApiTests + # run tests on particular versions + tox -e py27-django18-thumbs2x,py34-django_master-thumbs2x + # run a test class in specific environment + tox -e py27-django18-thumbs2x -- test filer.tests.models.FilerApiTests + # run a specific testcase in specific environment + tox -e py27-django18-thumbs2x -- test filer.tests.models.FilerApiTests.test_create_folder_structure ``--verbosity=3`` and ``--failfast`` are also supported. diff --git a/setup.py b/setup.py index a1e4bda70..3efab7fa7 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def read(fname): author_email='stefan@foulis.ch', packages=find_packages(), install_requires=( - 'Django>=1.5,<1.9', + 'Django>=1.5,<1.8.99', # Django is known to use rc versions 'easy-thumbnails>=1.0,<2.4', 'django-mptt>=0.6,<0.9', # the exact version depends on Django 'django_polymorphic>=0.7,<0.9', @@ -52,9 +52,4 @@ def read(fname): 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], - test_suite='cms_helper.run', - tests_require=( - 'argparse', # needed on python 2.6 - 'south', - ), ) diff --git a/tox.ini b/tox.ini index 170672217..8382cfc7d 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = commands = {envpython} --version - coverage erase - coverage run --rcfile=coverage.rc test_settings.py + coverage run --rcfile=coverage.rc test_settings.py {posargs} - coverage report setenv = custom_image: CUSTOM_IMAGE=filer.test_utils.custom_image.models.Image