summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ci-constraints-requirements.txt2
-rw-r--r--pyproject.toml2
-rw-r--r--setup.cfg1
-rw-r--r--tests/conftest.py6
4 files changed, 9 insertions, 2 deletions
diff --git a/ci-constraints-requirements.txt b/ci-constraints-requirements.txt
index 873fcf66c..5dd274497 100644
--- a/ci-constraints-requirements.txt
+++ b/ci-constraints-requirements.txt
@@ -141,7 +141,7 @@ pytest-randomly==3.12.0
# via cryptography (setup.cfg)
pytest-shard==0.1.2
# via cryptography (setup.cfg)
-pytest-subtests==0.9.0; python_version >= "3.7"
+pytest-subtests==0.10.0; python_version >= "3.7"
# via cryptography (setup.cfg)
pytest-xdist==3.2.0; python_version >= "3.7"
# via cryptography (setup.cfg)
diff --git a/pyproject.toml b/pyproject.toml
index e4f17dc5f..1f1a8ab49 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -15,7 +15,7 @@ line-length = 79
target-version = ["py36"]
[tool.pytest.ini_options]
-addopts = "-r s --capture=no --strict-markers --benchmark-disable"
+addopts = "-r s --capture=no --strict-markers --benchmark-disable --no-subtests-shortletter"
markers = [
"skip_fips: this test is not executed in FIPS mode",
"supported: parametrized test requiring only_if and skip_message",
diff --git a/setup.cfg b/setup.cfg
index 8a22fec8b..b2ecf8961 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -62,6 +62,7 @@ test =
pytest-shard>=0.1.2
pytest-benchmark
pytest-cov
+ # pytest-subtests needs >=0.10.0 when we drop py36 support
pytest-subtests
pytest-xdist
pretend
diff --git a/tests/conftest.py b/tests/conftest.py
index f077184d0..4b215802b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -2,6 +2,7 @@
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
+import sys
import pytest
@@ -27,6 +28,11 @@ def pytest_report_header(config):
def pytest_addoption(parser):
parser.addoption("--wycheproof-root", default=None)
parser.addoption("--enable-fips", default=False)
+ # REMOVE ME WHEN WE DROP PYTHON 3.6 SUPPORT
+ # This just adds a no-op flag so that we don't error on py36 where
+ # pytest-subtests is stuck on 0.8.0
+ if sys.version_info[:2] == (3, 6):
+ parser.addoption("--no-subtests-shortletter", action="store_true")
def pytest_runtest_setup(item):