Skip to content

Commit 3cc1069

Browse files
Jon Bettsun33k
Jon Betts
authored andcommitted
Add a tox file to automatically run the tests and add Python 3.9
1 parent c340834 commit 3cc1069

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

.python-version

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
3.9.2
2+
3.8.8
3+
3.7.10
4+
3.6.13
5+
3.5.10
6+
2.7.18
7+
pypy-5.7.1
8+
pypy3.7-7.3.3

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ python:
77
- "3.6"
88
- "3.7"
99
- "3.8"
10+
- "3.9"
1011
- "pypy"
1112
- "pypy3"
1213

1314
install:
1415
- pip install pip -U
1516
- pip install -e .
1617
- pip install pycodestyle
17-
- pip install coveralls
18+
# Avoid cryptography compilation problems with pypy and 2.7
19+
- pip install coveralls 'cryptography<=3.0;python_version=="2.7"'
1820
- pip install https://github.com/un33k/pyflakes/tarball/master
1921

2022
before_script:

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ quick-brown-fox-jumps-over-lazy-dog
166166
Running the tests
167167
====================
168168

169+
To run the tests against all environments:
170+
171+
tox
172+
169173
To run the tests against the current environment:
170174

171175
python test.py

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
'Programming Language :: Python :: 3.5',
3131
'Programming Language :: Python :: 3.6',
3232
'Programming Language :: Python :: 3.7',
33+
'Programming Language :: Python :: 3.8',
34+
'Programming Language :: Python :: 3.9',
3335
]
3436

3537

tox.ini

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[tox]
2+
envlist = py{39,38,37,36,35,27},pypy,pypy3
3+
4+
[testenv]
5+
deps=
6+
-e .
7+
commands =
8+
python -m unittest test
9+
10+
[testenv:format]
11+
deps = pycodestyle
12+
allowlist_externals = sh
13+
commands = sh format.sh
14+
15+
[testenv:coverage]
16+
deps = coverage
17+
commands =
18+
coverage run --source=slugify test.py

0 commit comments

Comments
 (0)