summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-08-11 11:00:29 -0400
committeranselor <anselor@gmail.com>2020-08-11 13:01:25 -0400
commit115143a1a3626cd651d3d18affd13cd60e1d06c8 (patch)
tree7ff5470062466a02251d6597533b2183a507a8b8
parent9d314de00100642679abda2cd5e7e0302cde9679 (diff)
downloadcmd2-git-115143a1a3626cd651d3d18affd13cd60e1d06c8.tar.gz
Adding explicit python 3.5.2 test to nox, travis
Python 3.5.2 introduced a bug in typing that was fixed in 3.5.3. The bug in typing prevents the latest nox from running properly. Ubuntu 16.04 stopped at python 3.5.2. To work-around, force an older version of nox when testing 3.5.2
-rw-r--r--.travis.yml5
-rw-r--r--noxfile.py5
-rwxr-xr-xsetup.py10
3 files changed, 14 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index aff51bcb..6a9cdac2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,9 @@ language: python
matrix:
include:
- os: linux
+ python: 3.5.2
+ env: NOXSESSION=tests-3.5.2
+ - os: linux
python: 3.5.3
env: NOXSESSION=tests-3.5.3
- os: linux
@@ -38,7 +41,7 @@ matrix:
# - BREW_INSTALL=python3
install:
- - pip install flake8 nox
+ - if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then pip install flake8 nox==2019.11.9; else pip install flake8 nox; fi
# - |
# if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
# if [[ -n "$BREW_INSTALL" ]]; then
diff --git a/noxfile.py b/noxfile.py
index 4da881aa..7d51a948 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -14,7 +14,7 @@ def docs(session):
'-d', '{}/doctrees'.format(tmpdir), '.', '{}/html'.format(tmpdir))
-@nox.session(python=['3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9'])
+@nox.session(python=['3.5.2', '3.5.3', '3.5', '3.6', '3.7', '3.8', '3.9'])
@nox.parametrize('plugin', [None,
'ext_test',
'template',
@@ -29,10 +29,9 @@ def tests(session, plugin):
session.install('invoke', 'codecov', 'coverage')
session.run('codecov')
else:
- session.install('invoke', '.')
+ session.install('invoke', './', 'plugins/{}[test]'.format(plugin))
# cd into test directory to run other unit test
- session.install('plugins/{}[test]'.format(plugin))
session.run('invoke',
'plugin.{}.pytest'.format(plugin.replace('_', '-')),
'--junit',
diff --git a/setup.py b/setup.py
index 4feeb126..4eb93cd2 100755
--- a/setup.py
+++ b/setup.py
@@ -51,13 +51,19 @@ EXTRAS_REQUIRE = {
"mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
'codecov',
'coverage',
- 'pytest',
+ 'pytest>=4.6',
'pytest-cov',
'pytest-mock',
],
# development only dependencies: install with 'pip install -e .[dev]'
'dev': ["mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
- 'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'nox', 'flake8',
+ "pytest>=4.6",
+ 'codecov',
+ 'pytest-cov',
+ 'pytest-mock',
+ "nox==2019.11.9 ; python_version=='3.5.2'",
+ "nox ; python_version>'3.5.2'",
+ 'flake8',
'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'doc8',
'invoke', 'twine>=1.11',
]