summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Betts <jon.betts@hypothes.is>2021-04-30 18:57:48 +0100
committerVal Neekman <un33kvu@gmail.com>2021-04-30 15:11:54 -0400
commit3cc1069d37431efd366a0894067aa4c3293dca3e (patch)
tree23557f0e7aed8ef86449ca1ec761a5c22a052ccf
parentc340834bb2afb24d78151c018496f4273fb7be37 (diff)
downloadpython-slugify-3cc1069d37431efd366a0894067aa4c3293dca3e.tar.gz
Add a tox file to automatically run the tests and add Python 3.9
-rw-r--r--.python-version8
-rw-r--r--.travis.yml4
-rw-r--r--README.md4
-rwxr-xr-xsetup.py2
-rw-r--r--tox.ini18
5 files changed, 35 insertions, 1 deletions
diff --git a/.python-version b/.python-version
new file mode 100644
index 0000000..0d88666
--- /dev/null
+++ b/.python-version
@@ -0,0 +1,8 @@
+3.9.2
+3.8.8
+3.7.10
+3.6.13
+3.5.10
+2.7.18
+pypy-5.7.1
+pypy3.7-7.3.3
diff --git a/.travis.yml b/.travis.yml
index ee9335c..3c917db 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ python:
- "3.6"
- "3.7"
- "3.8"
+ - "3.9"
- "pypy"
- "pypy3"
@@ -14,7 +15,8 @@ install:
- pip install pip -U
- pip install -e .
- pip install pycodestyle
- - pip install coveralls
+ # Avoid cryptography compilation problems with pypy and 2.7
+ - pip install coveralls 'cryptography<=3.0;python_version=="2.7"'
- pip install https://github.com/un33k/pyflakes/tarball/master
before_script:
diff --git a/README.md b/README.md
index c5803f1..0e0195f 100644
--- a/README.md
+++ b/README.md
@@ -166,6 +166,10 @@ quick-brown-fox-jumps-over-lazy-dog
Running the tests
====================
+To run the tests against all environments:
+
+ tox
+
To run the tests against the current environment:
python test.py
diff --git a/setup.py b/setup.py
index 506f77b..038a85f 100755
--- a/setup.py
+++ b/setup.py
@@ -30,6 +30,8 @@ classifiers = [
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
]
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..d189cbd
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = py{39,38,37,36,35,27},pypy,pypy3
+
+[testenv]
+deps=
+ -e .
+commands =
+ python -m unittest test
+
+[testenv:format]
+deps = pycodestyle
+allowlist_externals = sh
+commands = sh format.sh
+
+[testenv:coverage]
+deps = coverage
+commands =
+ coverage run --source=slugify test.py \ No newline at end of file