summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml10
-rw-r--r--tests/unittest_brain.py7
-rw-r--r--tox.ini12
3 files changed, 18 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index d30c9386..722fa036 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,17 +10,17 @@ jobs:
- python: 3.6
env: TOXENV=formatting
- python: 3.5
- env: TOXENV=py35
+ env: TOXENV=py35,py35-six
- python: pypy3
env: TOXENV=pypy
- python: 3.6
- env: TOXENV=py36
+ env: TOXENV=py36,py36-six
- python: 3.7
- env: TOXENV=py37
+ env: TOXENV=py37,py37-six
- python: 3.8
- env: TOXENV=py38
+ env: TOXENV=py38,py38-six
- python: 3.9
- env: TOXENV=py39
+ env: TOXENV=py39,py39-six
before_install:
- python --version
- uname -a
diff --git a/tests/unittest_brain.py b/tests/unittest_brain.py
index e710ccaa..166cbef6 100644
--- a/tests/unittest_brain.py
+++ b/tests/unittest_brain.py
@@ -32,6 +32,7 @@
import io
import queue
import re
+import os
try:
import multiprocessing # pylint: disable=unused-import
@@ -401,6 +402,12 @@ class NoseBrainTest(unittest.TestCase):
@unittest.skipUnless(HAS_SIX, "These tests require the six library")
class SixBrainTest(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ tox_env = os.environ.get("TOX_ENV_NAME")
+ if tox_env and not tox_env.endswith("-six") and HAS_SIX:
+ raise Exception("six was installed in a non-six testing environment.")
+
def test_attribute_access(self):
ast_nodes = builder.extract_node(
"""
diff --git a/tox.ini b/tox.ini
index 0e5d5a5a..5379d136 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py35, py36, py37, py38, py39, pypy, pylint
+envlist = py{36,37,38,39}, py{36,37,38,39}-six, pylint
skip_missing_interpreters = true
[testenv:pylint]
@@ -18,13 +18,13 @@ deps =
; we have a brain for nose
; we use pytest for tests
nose
- py35,py36,py37,py38,py39: numpy
- py35,py36,py37,py38,py39: attr
- py35,py36,py37,py38,py39: typed_ast>=1.4.0,<1.5
+ py{35,36,37,38,39}: numpy
+ py{35,36,37,38,39}: attrs
+ py{35,36,37,38,39}: typed_ast>=1.4.0,<1.5
pytest
- python-dateutil
+ !py{35,36,37,38,39}-six: python-dateutil
pypy: singledispatch
- six~=1.12
+ six: six
wrapt>=1.11,<1.13
coverage<5