Skip to content

Commit

Permalink
fixes #33 - Separate Install from Test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Nov 6, 2013
1 parent 56318eb commit 04ff296
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -3,6 +3,7 @@
Release 0.3 (in development)
============================

* fixed :ghissue:`33`
* fixed :ghissue:`20`
* add feature to :ref:`use callable as columns <export_with_callable>`
* add feature to :ref:`export dictionaries <export_with_dictionaries>`
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -3,8 +3,8 @@ include MANIFEST.in
include AUTHORS
include CHANGES
include LICENSE
include requirements.txt
include setup.py
recursive-include adminactions *.*
recursive-exclude adminactions *.pyc
recursive-include requirements *.pip

2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -48,7 +48,7 @@ ci:
@python -c "from __future__ import print_function;import django;print('Django version:', django.get_version())"
@echo "Database:" ${DBENGINE}

@pip install -r adminactions/requirements.pip
@pip install -r adminactions/requirements/install.pip -r adminactions/requirements/testing.pip

DISABLE_SELENIUM=1 $(MAKE) coverage

Expand Down
1 change: 1 addition & 0 deletions adminactions/requirements/install.pip
@@ -0,0 +1 @@
unicodecsv>=0.9.4
@@ -1,4 +1,3 @@
unicodecsv>=0.9.4
mock==1.0.1
selenium==2.32.0
django-webtest==1.7.5
Expand All @@ -10,3 +9,4 @@ coverage
pytest
pytest-django
pytest-cov
django
11 changes: 10 additions & 1 deletion docs/source/install.rst
Expand Up @@ -16,7 +16,16 @@ your project or ``PYTHONPATH``.

3. Either symlink the ``adminactions`` directory into your project or copy the directory in. What ever works best for you.

4. Optionally install unicodecsv with ``pip install unicodecsv``

Install test dependencies
=========================

If you wanto to run :mod:`adminactions` tests you need extra requirements


.. code-block:: python
pip install -U django-adminactions[tests]
Configuration
Expand Down
13 changes: 12 additions & 1 deletion setup.py
Expand Up @@ -10,6 +10,11 @@
def fread(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

#if 'test' in sys.argv:
# setup_requires.append('pytest')

tests_require = fread('adminactions/requirements/testing.pip')

setup(
name=NAME,
version=RELEASE,
Expand All @@ -21,7 +26,13 @@ def fread(fname):
license='BSD',
packages=find_packages(),
include_package_data=True,
install_requires=fread('adminactions/requirements.pip').split('\n'),
install_requires=fread('adminactions/requirements/install.pip'),
test_require=tests_require,
extras_require={
'tests': tests_require,
},
test_suite='conftest.runtests',
#cmdclass={'test': 'conftest.runtests'},
zip_safe=False,
platforms=['any'],
classifiers=[
Expand Down
5 changes: 3 additions & 2 deletions webtests/test_mass_update.py
@@ -1,14 +1,15 @@
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django_dynamic_fixture import G
from django_webtest import WebTest
from django_webtest import WebTestMixin
from django.test import TestCase, TransactionTestCase
from webtests.utils import CheckSignalsMixin, user_grant_permission, SelectRowsMixin


__all__ = ['MassUpdateTest', ]


class MassUpdateTest(SelectRowsMixin, CheckSignalsMixin, WebTest):
class MassUpdateTest(SelectRowsMixin, CheckSignalsMixin, WebTestMixin, TransactionTestCase):
fixtures = ['adminactions', 'demoproject']
urls = 'demoproject.urls'

Expand Down

0 comments on commit 04ff296

Please sign in to comment.