From 3bd7305aeb2e4e6f20b1c67717848c0d66745157 Mon Sep 17 00:00:00 2001 From: Thomas Schraitle Date: Mon, 30 Sep 2019 21:56:04 +0200 Subject: [PATCH 1/5] Fix #145: add posargs in tox.ini (single test cases) Without the posargs argument tox has to run the *complete* test suite. With this patch, you can pass a test file and a test function. That allows tox to only run this specific test function. For example: $ tox -e py36 test_semver.py::test_should_bump_major --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e172f8a1..f7b1b2e6 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = pypy [testenv] -commands = py.test +commands = py.test {posargs:} deps = pytest pytest-cov From 8ccec3661cb55f4cec6c44d2d3f1c7998c6e6a95 Mon Sep 17 00:00:00 2001 From: Thomas Schraitle Date: Tue, 1 Oct 2019 08:40:23 +0200 Subject: [PATCH 2/5] tox.ini: py.test -> pytest The old spelling py.test will be deprecated in the future. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f7b1b2e6..33b60895 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = pypy [testenv] -commands = py.test {posargs:} +commands = pytest {posargs:} deps = pytest pytest-cov From e5ed0c43779e34a640808514ef1537cbc3ea37bb Mon Sep 17 00:00:00 2001 From: Thomas Schraitle Date: Tue, 1 Oct 2019 09:21:38 +0200 Subject: [PATCH 3/5] .travis.yml: use tox instead of setup.py --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 633becbe..5ee9280f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: python install: - pip install --upgrade pip setuptools - pip install virtualenv -script: python setup.py test +script: tox -v matrix: include: - python: "2.7" From 34d946110b541757b45ebd3e429fa830c38213b4 Mon Sep 17 00:00:00 2001 From: Thomas Schraitle Date: Tue, 1 Oct 2019 09:25:07 +0200 Subject: [PATCH 4/5] .travis.yml: Add tox as requirement --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5ee9280f..d77d3eb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python install: - pip install --upgrade pip setuptools - - pip install virtualenv + - pip install virtualenv tox script: tox -v matrix: include: From ad6f00c7a723cd22690e9f09d66e89b215d18b6b Mon Sep 17 00:00:00 2001 From: Thomas Schraitle Date: Tue, 1 Oct 2019 09:30:37 +0200 Subject: [PATCH 5/5] .travis.yml: Add cache for pip This make consecutive calls a bit faster --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d77d3eb6..0082ac4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ +# config file for automatic testing at travis-ci.org language: python +cache: pip install: - pip install --upgrade pip setuptools - pip install virtualenv tox