summaryrefslogtreecommitdiff
path: root/noxfile.py
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-02-21 12:26:15 -0600
committerJordan Cook <jordan.cook@pioneer.com>2022-02-22 18:53:29 -0600
commit7d1cdeae7a03dc1abb2123f83a9fb861b77f69cc (patch)
tree7299b8246d6bef49d301dd1d5ea03ab53e155bbb /noxfile.py
parent6e595f3d56a0b25b2380394921883a09eaea55d0 (diff)
downloadrequests-cache-7d1cdeae7a03dc1abb2123f83a9fb861b77f69cc.tar.gz
Add stress test shortcut for nox
Diffstat (limited to 'noxfile.py')
-rw-r--r--noxfile.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/noxfile.py b/noxfile.py
index d57980d..7773dcf 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -1,7 +1,8 @@
"""Notes:
-* 'test' command: nox will use poetry.lock to determine dependency versions
+* 'test-<python version>' commands: nox will use poetry.lock to determine dependency versions
* 'lint' command: tools and environments are managed by pre-commit
* All other commands: the current environment will be used instead of creating new ones
+* Run `nox -l` to see all available commands
"""
from os.path import join
from shutil import rmtree
@@ -52,6 +53,14 @@ def coverage(session):
session.run(*cmd_2.split(' '))
+@session(python=False, name='stress')
+def stress_test(session):
+ """Run concurrency tests with a higher stress test multiplier"""
+ multiplier = session.posargs[0] if session.posargs else 5
+ cmd = f'pytest {INTEGRATION_TESTS} -rs -k multithreaded'
+ session.run(*cmd.split(' '), env={'STRESS_TEST_MULTIPLIER': str(multiplier)})
+
+
@session(python=False)
def docs(session):
"""Build Sphinx documentation"""