Skip to content

Commit f5a32c2

Browse files
committed
Add tox for running easily
1 parent c5f26c2 commit f5a32c2

File tree

6 files changed

+38
-12
lines changed

6 files changed

+38
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.tox/
23
build/
34
dist/
45
*.egg-info

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ sudo: false
33
services: cassandra
44

55
env:
6-
- DJANGO_VERSION=1.6 CASS_DRIVER_NO_CYTHON=1
7-
- DJANGO_VERSION=1.7 CASS_DRIVER_NO_CYTHON=1
8-
- DJANGO_VERSION=1.8 CASS_DRIVER_NO_CYTHON=1
9-
- DJANGO_VERSION=1.9 CASS_DRIVER_NO_CYTHON=1
6+
- CASS_DRIVER_NO_CYTHON=1
107

118
python:
129
- "2.7"
@@ -22,8 +19,8 @@ addons:
2219
- libev-dev
2320

2421
install:
25-
- "pip install django==${DJANGO_VERSION} django_nose==1.4.3"
26-
- python setup.py install
22+
- pip install tox
2723

2824
script:
29-
- "python setup.py test"
25+
- tox
26+

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Update `cassandra-driver` to 3.1.0
66
* Fix `syncdb` command in `Django>=1.9`
77
* Fix not working `django.contrib.admin` app when dce is used
8+
* add `tox` for running tests easily
89

910
## Version 0.6.6 (04.03.2016)
1011

docs/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,9 @@ to connect to the host that is listed first.
226226
## Working with source code and running tests
227227

228228
git clone https://github.com/r4fek/django-cassandra-engine.git
229+
pip install tox
229230
cd django_cassandra_engine
230-
# mkvirtualenv cassengine
231-
pip install -r requirements-dev.txt
232-
python setup.py install
233-
python setup.py test
231+
tox
234232

235233
---
236234

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements.txt
22
mock==1.0.1
3-
django_nose==1.4.3
3+
tox

tox.ini

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[tox]
2+
envlist = django{17,18,19}
3+
4+
[base]
5+
deps = nose
6+
django-nose
7+
six
8+
mock<=1.0.1
9+
10+
[testenv]
11+
deps={[base]deps}
12+
chaangedir={toxinidir}/testproject
13+
commands=python {toxinidir}/testproject/runtests.py
14+
15+
[testenv:django17]
16+
deps =
17+
django>=1.7, <1.8
18+
{[base]deps}
19+
20+
[testenv:django18]
21+
deps =
22+
django>=1.8, <1.9
23+
{[base]deps}
24+
25+
[testenv:django19]
26+
deps =
27+
django>=1.9, <1.10
28+
{[base]deps}
29+

0 commit comments

Comments
 (0)