From 324f9be68ca1e26f33ab55bd4ae826185a776aeb Mon Sep 17 00:00:00 2001 From: Atsushi Kanaya Date: Wed, 5 Jul 2017 20:06:03 +0900 Subject: [PATCH 1/3] Specify folder of source and test because py.test runs unnecessary tests when virtualenv dir is placed. --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 209baf4..937a34d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,6 +4,6 @@ license-file = LICENSE [wheel] universal = 1 -[pytest] -addopts = -rsxX -v +[tool:pytest] +addopts = -rsxX -v tests acme norecursedirs = .git From 306e7088a26e8d3c7cdc2d96c093995f35bf5777 Mon Sep 17 00:00:00 2001 From: Atsushi Kanaya Date: Wed, 5 Jul 2017 20:06:41 +0900 Subject: [PATCH 2/3] Support tests from py27 to py35 and pypy using tox and travisci --- .travis.yml | 14 ++++++++++++++ requirements.txt | 2 ++ setup.py | 4 +++- tox.ini | 13 +++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e798535 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python +python: + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - pypy + +install: + - pip install tox tox-travis + - pip install coverage coveralls + +script: + - tox -r diff --git a/requirements.txt b/requirements.txt index 5b47118..6280f60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,5 @@ py==1.4.17 pytest==2.4.2 pytest-cov==1.6 pytest-xdist==1.9 +tox==2.7.0 +virtualenv==15.1.0 diff --git a/setup.py b/setup.py index 6bd5dda..4687786 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ def run_tests(self): setup( name='skeleton_for_pytest', - version='0.0.1', + version='0.0.2', url='https://github.com/tddbc/python_pytest.git', author='TDD BaseCamp', author_email='tddbc@googlegroups.com', @@ -36,6 +36,8 @@ def run_tests(self): 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: Implementation :: PyPy', ], ) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2d3a29c --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +skipsdist = True +envlist = + py27, + py33, + py34, + py35 + +[testenv] +deps= + -r{toxinidir}/requirements.txt +commands= + python setup.py test From feb6c4814ac8d5611c8c61fe626bbb392713d434 Mon Sep 17 00:00:00 2001 From: Atsushi Kanaya Date: Wed, 5 Jul 2017 20:20:55 +0900 Subject: [PATCH 3/3] Use current version for all libraries. --- requirements.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6280f60..ab0619b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -cov-core==1.7 -coverage==3.7 -execnet==1.1 -py==1.4.17 -pytest==2.4.2 -pytest-cov==1.6 -pytest-xdist==1.9 +cov-core==1.15.0 +coverage==4.4.1 +execnet==1.4.1 +py==1.4.34 +pytest==3.1.3 +pytest-cov==2.5.1 +pytest-xdist==1.18.0 tox==2.7.0 virtualenv==15.1.0