Permalink
Browse files

fixes #33 - Separate Install from Test requirements

  • Loading branch information...
1 parent 56318eb commit 04ff296720847356f61fee688c9024b3406a00b1 @saxix committed Nov 6, 2013
View
@@ -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>`
View
@@ -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
View
@@ -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
@@ -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
@@ -10,3 +9,4 @@ coverage
pytest
pytest-django
pytest-cov
+django
View
@@ -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
View
@@ -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,
@@ -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=[
@@ -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'

0 comments on commit 04ff296

Please sign in to comment.