summaryrefslogtreecommitdiff
path: root/noxfile.py
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook.git@proton.me>2022-12-04 13:05:10 -0600
committerJordan Cook <jordan.cook.git@proton.me>2022-12-30 15:11:33 -0600
commit851e8750dd32e58554433d1ebebd9fc8d012d4ba (patch)
tree6e67797f1dfbcc0814d2b2536624bec9a9441b93 /noxfile.py
parentb22db537986f91d72d771731df1828e083e45736 (diff)
downloadrequests-cache-851e8750dd32e58554433d1ebebd9fc8d012d4ba.tar.gz
Add tests for pypy3.9
Diffstat (limited to 'noxfile.py')
-rw-r--r--noxfile.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/noxfile.py b/noxfile.py
index b25854c..997aa32 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -7,6 +7,7 @@ Notes:
* All other commands: the current environment will be used instead of creating new ones
* Run `nox -l` to see all available commands
"""
+import platform
from os import getenv
from os.path import join
from shutil import rmtree
@@ -22,7 +23,7 @@ LIVE_DOCS_IGNORE = ['*.pyc', '*.tmp', join('**', 'modules', '*')]
LIVE_DOCS_WATCH = ['requests_cache', 'examples']
CLEAN_DIRS = ['dist', 'build', join('docs', '_build'), join('docs', 'modules')]
-PYTHON_VERSIONS = ['3.7', '3.8', '3.9', '3.10']
+PYTHON_VERSIONS = ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.9']
UNIT_TESTS = join('tests', 'unit')
INTEGRATION_TESTS = join('tests', 'integration')
STRESS_TEST_MULTIPLIER = 10
@@ -30,6 +31,8 @@ DEFAULT_COVERAGE_FORMATS = ['html', 'term']
# Run tests in parallel, grouped by test module
XDIST_ARGS = '--numprocesses=auto --dist=loadfile'
+IS_PYPY = platform.python_implementation() == 'PyPy'
+
@session(python=PYTHON_VERSIONS)
def test(session):
@@ -60,7 +63,9 @@ def clean(session):
@session(python=False, name='cov')
def coverage(session):
"""Run tests and generate coverage report"""
- cmd = f'pytest {UNIT_TESTS} {INTEGRATION_TESTS} -rs {XDIST_ARGS} --cov'.split(' ')
+ cmd = f'pytest {UNIT_TESTS} {INTEGRATION_TESTS} -rs --cov'.split(' ')
+ if not IS_PYPY:
+ cmd += XDIST_ARGS.split(' ')
# Add coverage formats
cov_formats = session.posargs or DEFAULT_COVERAGE_FORMATS