From 1519b38af08cdb93b8e84563be7fc9cdb7fc6b79 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 11 Nov 2016 19:03:18 -0200 Subject: [PATCH 1/6] Allow failure of py35-trial on Travis Related to #1989 --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c36a298c..bbc03d856 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,13 +22,17 @@ env: - TESTENV=py27-trial - TESTENV=py35-pexpect - TESTENV=py35-xdist - # Disable py35-trial temporarily: #1989 - #- TESTENV=py35-trial + - TESTENV=py35-trial - TESTENV=py27-nobyte - TESTENV=doctesting - TESTENV=freeze - TESTENV=docs +matrix: + allow_failures: + # py35-trial failing on Linux: #1989 + - env: TESTENV=py35-trial + script: tox --recreate -e $TESTENV notifications: From 98caeedd9e22d12184bbef4910650d3e2b1f9dd9 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 11 Nov 2016 19:17:14 -0200 Subject: [PATCH 2/6] Allow failure of pypy on AppVeyor Related to #1963 --- appveyor.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index cd95611cb..64c9d6018 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,10 +8,15 @@ environment: matrix: # create multiple jobs to execute a set of tox runs on each; this is to workaround having # builds timing out in AppVeyor - # pypy is disabled until #1963 gets fixed - TOXENV: "linting,py26,py27,py33,py34,py35" - TOXENV: "py27-pexpect,py27-xdist,py27-trial,py35-pexpect,py35-xdist,py35-trial" - TOXENV: "py27-nobyte,doctesting,freeze,docs" + - TOXENV: "pypy" + +matrix: + allow_failures: + # pypy is disabled until #1963 gets fixed + - TOXENV: "pypy" install: - echo Installed Pythons @@ -21,10 +26,10 @@ install: # choco install returns non-zero, because choco install python.pypy is too # noisy) # pypy is disabled until #1963 gets fixed - #- choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) - #- set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy - #- echo PyPy installed - #- pypy --version + - choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) + - set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy + - echo PyPy installed + - pypy --version - C:\Python35\python -m pip install tox From 351395b7ea3607424110815e0eff6fd34166fc68 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 11 Nov 2016 17:31:36 -0200 Subject: [PATCH 3/6] Use a wrapper script to bypass check-manifest if not under git Related to comment in #2051 --- MANIFEST.in | 2 ++ scripts/check-manifest.py | 21 +++++++++++++++++++++ tox.ini | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 scripts/check-manifest.py diff --git a/MANIFEST.in b/MANIFEST.in index 0c5bfd552..24b4cfc9b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,6 +9,8 @@ include HOWTORELEASE.rst include tox.ini include setup.py +recursive-include scripts *.py + include .coveragerc recursive-include bench *.py diff --git a/scripts/check-manifest.py b/scripts/check-manifest.py new file mode 100644 index 000000000..5911a84fe --- /dev/null +++ b/scripts/check-manifest.py @@ -0,0 +1,21 @@ +""" +Script used by tox.ini to check the manifest file if we are under version control, or skip the +check altogether if not. + +"check-manifest" will needs a vcs to work, which is not available when testing the package +instead of the source code (with ``devpi test`` for example). +""" + +from __future__ import print_function + +import os +import subprocess +import sys + + +if os.path.isdir('.git'): + sys.exit(subprocess.call('check-manifest', shell=True)) +else: + print('No .git directory found, skipping checking the manifest file') + sys.exit(0) + diff --git a/tox.ini b/tox.ini index 17fe0e3e4..efa3ad2f1 100644 --- a/tox.ini +++ b/tox.ini @@ -52,7 +52,7 @@ deps = restructuredtext_lint check-manifest commands = - check-manifest + {envpython} scripts/check-manifest.py flake8 pytest.py _pytest testing rst-lint CHANGELOG.rst HOWTORELEASE.rst README.rst From c169c883d359026a970b71262dd941c72a344ac0 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Nov 2016 11:50:22 -0200 Subject: [PATCH 4/6] Use one job for each tox env on AppVeyor Some time ago when we first added support for testing pytest on AppVeyor, jobs in a build would not start immediately one after the other, as if AppVeyor would schedule jobs from other builds (projects) in its VMs. So it made sense at the time to reduce the number of jobs. I have noticed in other projects that this behavior has changed, and jobs in a build now start one after the other. Having a separate list then improves visibility when the build fails, because we can see at a glance the failing(s) tox environment(s). --- appveyor.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 64c9d6018..b761e0352 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,17 +6,23 @@ environment: # https://www.appveyor.com/docs/build-configuration#secure-variables matrix: - # create multiple jobs to execute a set of tox runs on each; this is to workaround having - # builds timing out in AppVeyor - - TOXENV: "linting,py26,py27,py33,py34,py35" - - TOXENV: "py27-pexpect,py27-xdist,py27-trial,py35-pexpect,py35-xdist,py35-trial" - - TOXENV: "py27-nobyte,doctesting,freeze,docs" + - TOXENV: "linting" + - TOXENV: "py26" + - TOXENV: "py27" + - TOXENV: "py33" + - TOXENV: "py34" + - TOXENV: "py35" - TOXENV: "pypy" - -matrix: - allow_failures: - # pypy is disabled until #1963 gets fixed - - TOXENV: "pypy" + - TOXENV: "py27-pexpect" + - TOXENV: "py27-xdist" + - TOXENV: "py27-trial" + - TOXENV: "py35-pexpect" + - TOXENV: "py35-xdist" + - TOXENV: "py35-trial" + - TOXENV: "py27-nobyte" + - TOXENV: "doctesting" + - TOXENV: "freeze" + - TOXENV: "docs" install: - echo Installed Pythons From ec69514eb2be687f751e3a7a18d96e3e29d44c16 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Nov 2016 12:29:40 -0200 Subject: [PATCH 5/6] Only install pypy on AppVeyor for "pypy" tox-env --- MANIFEST.in | 1 + appveyor.yml | 10 ++-------- scripts/install-pypy.bat | 6 ++++++ 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 scripts/install-pypy.bat diff --git a/MANIFEST.in b/MANIFEST.in index 24b4cfc9b..c57cbd911 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,7 @@ include tox.ini include setup.py recursive-include scripts *.py +recursive-include scripts *.bat include .coveragerc diff --git a/appveyor.yml b/appveyor.yml index b761e0352..7192ec06f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,7 @@ environment: # https://www.appveyor.com/docs/build-configuration#secure-variables matrix: + # note: please use "tox --listenvs" to populate the build matrix below - TOXENV: "linting" - TOXENV: "py26" - TOXENV: "py27" @@ -28,14 +29,7 @@ install: - echo Installed Pythons - dir c:\Python* - # install pypy using choco (redirect to a file and write to console in case - # choco install returns non-zero, because choco install python.pypy is too - # noisy) - # pypy is disabled until #1963 gets fixed - - choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) - - set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy - - echo PyPy installed - - pypy --version + - if "%TOXENV%" == "pypy" scripts\install-pypy.bat - C:\Python35\python -m pip install tox diff --git a/scripts/install-pypy.bat b/scripts/install-pypy.bat new file mode 100644 index 000000000..8012ea46a --- /dev/null +++ b/scripts/install-pypy.bat @@ -0,0 +1,6 @@ +REM install pypy using choco +REM redirect to a file because choco install python.pypy is too noisy. If the command fails, write output to console +choco install python.pypy > pypy-inst.log 2>&1 || (type pypy-inst.log & exit /b 1) +set PATH=C:\tools\pypy\pypy;%PATH% # so tox can find pypy +echo PyPy installed +pypy --version From 50328f47db986c5c66813b2ae3654207919aad1c Mon Sep 17 00:00:00 2001 From: Igor Starikov Date: Sun, 13 Nov 2016 18:04:39 +0700 Subject: [PATCH 6/6] Docs: Added pytest promotional talk in Russian --- doc/en/talks.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/en/talks.rst b/doc/en/talks.rst index 46188bbe7..c35fba0b0 100644 --- a/doc/en/talks.rst +++ b/doc/en/talks.rst @@ -11,6 +11,9 @@ Talks and Tutorials Talks and blog postings --------------------------------------------- +- `Pythonic testing, Igor Starikov (Russian, PyNsk, November 2016) + `_. + - `pytest - Rapid Simple Testing, Florian Bruhin, Swiss Python Summit 2016 `_.