summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-01-07 11:41:54 +0000
committerGitHub <noreply@github.com>2021-01-07 11:41:54 +0000
commit1d5c021a45465f2926f70bddfd64b79bc018a7da (patch)
tree57099ba0bf219b18024b2ff7df5973486bb191d0
parentSkip unit tests which require optional dependencies (#9031) (diff)
downloadsynapse-1d5c021a45465f2926f70bddfd64b79bc018a7da.tar.xz
tox: Add a -noextras factor (#9030)
... for running the tests with no optional deps.
-rw-r--r--changelog.d/9030.misc1
-rw-r--r--tox.ini8
2 files changed, 7 insertions, 2 deletions
diff --git a/changelog.d/9030.misc b/changelog.d/9030.misc
new file mode 100644
index 0000000000..267cfbf9f9
--- /dev/null
+++ b/changelog.d/9030.misc
@@ -0,0 +1 @@
+Add a `-noextras` factor to `tox.ini`, to support running the tests with no optional dependencies.
diff --git a/tox.ini b/tox.ini
index 8e8b495292..ab4ae295a9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,6 @@
 envlist = packaging, py35, py36, py37, py38, py39, check_codestyle, check_isort
 
 [base]
-extras = test
 deps =
     python-subunit
     junitxml
@@ -25,10 +24,15 @@ deps =
     # install the "enum34" dependency of cryptography.
     pip>=10
 
+# default settings for all tox environments
 [testenv]
 deps =
     {[base]deps}
-extras = all, test
+extras =
+    # install the optional dependendencies for tox environments without
+    # '-noextras' in their name
+    !noextras: all
+    test
 
 setenv =
     # use a postgres db for tox environments with "-postgres" in the name