Skip to content

Commit

Permalink
Fix documentation wrt tests and supported versions
Browse files Browse the repository at this point in the history
 * use stricter Django verison in setup.py
 * fix tox arguments passing
 * update docs
  • Loading branch information
Mykhailo Kolesnyk committed Jan 15, 2016
1 parent 871c4c4 commit 52586c7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
10 changes: 3 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
23 changes: 7 additions & 16 deletions docs/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,20 @@ Running tests

django-filer is continuously being tested on `travis-ci <https://travis-ci.org/divio/django-filer>`_.

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 <http://tox.readthedocs.org/en/latest/>`_. 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
done for you. Tox will setup multiple virtual environments with different python and django versions to test against::

# 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.

Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read(fname):
author_email='[email protected]',
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',
Expand All @@ -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',
),
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52586c7

Please sign in to comment.