PYTHON-3898 Add coverage to all variants (#2705)

This commit is contained in:
Steven Silvester 2026-02-17 12:23:34 -06:00 committed by GitHub
parent 36676384bd
commit b60d266ad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 129 additions and 156 deletions

4
.codecov.yml Normal file
View File

@ -0,0 +1,4 @@
# do not notify until at least 100 builds have been uploaded from the CI pipeline
# you can also set after_n_builds on comments independently
comment:
after_n_builds: 100

View File

@ -250,6 +250,7 @@ functions:
working_dir: src working_dir: src
include_expansions_in_env: include_expansions_in_env:
- TOOLCHAIN_VERSION - TOOLCHAIN_VERSION
- COVERAGE
type: test type: test
# Upload coverage codecov # Upload coverage codecov
@ -268,7 +269,7 @@ functions:
- github_pr_number - github_pr_number
- github_pr_head_branch - github_pr_head_branch
- github_author - github_author
- is_patch - requester
- branch_name - branch_name
type: test type: test

View File

@ -75,7 +75,7 @@ tasks:
SUB_TEST_NAME: session-creds SUB_TEST_NAME: session-creds
TOOLCHAIN_VERSION: 3.14t TOOLCHAIN_VERSION: 3.14t
tags: [auth-aws, auth-aws-session-creds, free-threaded] tags: [auth-aws, auth-aws-session-creds, free-threaded]
- name: test-auth-aws-rapid-web-identity-python3.14 - name: test-auth-aws-rapid-web-identity-python3.14-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -87,7 +87,8 @@ tasks:
TEST_NAME: auth_aws TEST_NAME: auth_aws
SUB_TEST_NAME: web-identity SUB_TEST_NAME: web-identity
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
tags: [auth-aws, auth-aws-web-identity] COVERAGE: "1"
tags: [auth-aws, auth-aws-web-identity, pr]
- name: test-auth-aws-rapid-web-identity-session-name-python3.14 - name: test-auth-aws-rapid-web-identity-session-name-python3.14
commands: commands:
- func: run server - func: run server
@ -904,7 +905,7 @@ tasks:
- ocsp-ecdsa - ocsp-ecdsa
- rapid - rapid
- ocsp-staple - ocsp-staple
- name: test-ocsp-ecdsa-valid-cert-server-staples-latest-python3.14 - name: test-ocsp-ecdsa-valid-cert-server-staples-latest-python3.14-cov
commands: commands:
- func: run tests - func: run tests
vars: vars:
@ -913,11 +914,13 @@ tasks:
TEST_NAME: ocsp TEST_NAME: ocsp
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
VERSION: latest VERSION: latest
COVERAGE: "1"
tags: tags:
- ocsp - ocsp
- ocsp-ecdsa - ocsp-ecdsa
- latest - latest
- ocsp-staple - ocsp-staple
- pr
- name: test-ocsp-ecdsa-invalid-cert-server-staples-v4.4-python3.10-min-deps - name: test-ocsp-ecdsa-invalid-cert-server-staples-v4.4-python3.10-min-deps
commands: commands:
- func: run tests - func: run tests
@ -1928,7 +1931,7 @@ tasks:
- ocsp-rsa - ocsp-rsa
- rapid - rapid
- ocsp-staple - ocsp-staple
- name: test-ocsp-rsa-valid-cert-server-staples-latest-python3.14 - name: test-ocsp-rsa-valid-cert-server-staples-latest-python3.14-cov
commands: commands:
- func: run tests - func: run tests
vars: vars:
@ -1937,11 +1940,13 @@ tasks:
TEST_NAME: ocsp TEST_NAME: ocsp
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
VERSION: latest VERSION: latest
COVERAGE: "1"
tags: tags:
- ocsp - ocsp
- ocsp-rsa - ocsp-rsa
- latest - latest
- ocsp-staple - ocsp-staple
- pr
- name: test-ocsp-rsa-invalid-cert-server-staples-v4.4-python3.10-min-deps - name: test-ocsp-rsa-invalid-cert-server-staples-v4.4-python3.10-min-deps
commands: commands:
- func: run tests - func: run tests
@ -2615,20 +2620,18 @@ tasks:
- replica_set-auth-nossl - replica_set-auth-nossl
- async - async
- free-threaded - free-threaded
- name: test-server-version-python3.13-sync-auth-nossl-replica-set-cov - name: test-server-version-python3.13-sync-auth-nossl-replica-set
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -2636,20 +2639,18 @@ tasks:
- python-3.13 - python-3.13
- replica_set-auth-nossl - replica_set-auth-nossl
- sync - sync
- name: test-server-version-python3.12-async-auth-ssl-replica-set-cov - name: test-server-version-python3.12-async-auth-ssl-replica-set
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2657,20 +2658,18 @@ tasks:
- python-3.12 - python-3.12
- replica_set-auth-ssl - replica_set-auth-ssl
- async - async
- name: test-server-version-python3.11-sync-auth-ssl-replica-set-cov - name: test-server-version-python3.11-sync-auth-ssl-replica-set
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -2743,20 +2742,18 @@ tasks:
- python-pypy3.11 - python-pypy3.11
- replica_set-noauth-ssl - replica_set-noauth-ssl
- async - async
- name: test-server-version-python3.14-sync-noauth-ssl-replica-set-cov - name: test-server-version-python3.14-sync-noauth-ssl-replica-set
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -2764,20 +2761,18 @@ tasks:
- python-3.14 - python-3.14
- replica_set-noauth-ssl - replica_set-noauth-ssl
- sync - sync
- name: test-server-version-python3.14-async-auth-nossl-sharded-cluster-cov - name: test-server-version-python3.14-async-auth-nossl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2829,20 +2824,18 @@ tasks:
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- async - async
- pr - pr
- name: test-server-version-python3.11-async-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.11-async-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2850,20 +2843,18 @@ tasks:
- python-3.11 - python-3.11
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- async - async
- name: test-server-version-python3.12-async-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.12-async-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2871,20 +2862,18 @@ tasks:
- python-3.12 - python-3.12
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- async - async
- name: test-server-version-python3.13-async-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.13-async-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2892,20 +2881,18 @@ tasks:
- python-3.13 - python-3.13
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- async - async
- name: test-server-version-python3.14-async-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.14-async-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -2976,20 +2963,18 @@ tasks:
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- sync - sync
- pr - pr
- name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.11-sync-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -2997,20 +2982,18 @@ tasks:
- python-3.11 - python-3.11
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- sync - sync
- name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.12-sync-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3018,20 +3001,18 @@ tasks:
- python-3.12 - python-3.12
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- sync - sync
- name: test-server-version-python3.13-sync-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.13-sync-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3039,20 +3020,18 @@ tasks:
- python-3.13 - python-3.13
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- sync - sync
- name: test-server-version-python3.14-sync-auth-ssl-sharded-cluster-cov - name: test-server-version-python3.14-sync-auth-ssl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3099,20 +3078,18 @@ tasks:
- python-pypy3.11 - python-pypy3.11
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- sync - sync
- name: test-server-version-python3.12-async-noauth-nossl-sharded-cluster-cov - name: test-server-version-python3.12-async-noauth-nossl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -3120,20 +3097,18 @@ tasks:
- python-3.12 - python-3.12
- sharded_cluster-noauth-nossl - sharded_cluster-noauth-nossl
- async - async
- name: test-server-version-python3.11-sync-noauth-nossl-sharded-cluster-cov - name: test-server-version-python3.11-sync-noauth-nossl-sharded-cluster
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3141,7 +3116,7 @@ tasks:
- python-3.11 - python-3.11
- sharded_cluster-noauth-nossl - sharded_cluster-noauth-nossl
- sync - sync
- name: test-server-version-python3.10-async-noauth-ssl-sharded-cluster-min-deps-cov - name: test-server-version-python3.10-async-noauth-ssl-sharded-cluster-min-deps
commands: commands:
- func: run server - func: run server
vars: vars:
@ -3149,14 +3124,12 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
TEST_MIN_DEPS: "1" TEST_MIN_DEPS: "1"
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
TEST_MIN_DEPS: "1" TEST_MIN_DEPS: "1"
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.10" TOOLCHAIN_VERSION: "3.10"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -3183,20 +3156,18 @@ tasks:
- python-pypy3.11 - python-pypy3.11
- sharded_cluster-noauth-ssl - sharded_cluster-noauth-ssl
- sync - sync
- name: test-server-version-python3.13-async-auth-nossl-standalone-cov - name: test-server-version-python3.13-async-auth-nossl-standalone
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -3204,20 +3175,18 @@ tasks:
- python-3.13 - python-3.13
- standalone-auth-nossl - standalone-auth-nossl
- async - async
- name: test-server-version-python3.12-sync-auth-nossl-standalone-cov - name: test-server-version-python3.12-sync-auth-nossl-standalone
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3225,20 +3194,18 @@ tasks:
- python-3.12 - python-3.12
- standalone-auth-nossl - standalone-auth-nossl
- sync - sync
- name: test-server-version-python3.11-async-auth-ssl-standalone-cov - name: test-server-version-python3.11-async-auth-ssl-standalone
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -3246,7 +3213,7 @@ tasks:
- python-3.11 - python-3.11
- standalone-auth-ssl - standalone-auth-ssl
- async - async
- name: test-server-version-python3.10-sync-auth-ssl-standalone-min-deps-cov - name: test-server-version-python3.10-sync-auth-ssl-standalone-min-deps
commands: commands:
- func: run server - func: run server
vars: vars:
@ -3254,14 +3221,12 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
TEST_MIN_DEPS: "1" TEST_MIN_DEPS: "1"
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
TEST_MIN_DEPS: "1" TEST_MIN_DEPS: "1"
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.10" TOOLCHAIN_VERSION: "3.10"
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3293,18 +3258,20 @@ tasks:
- standalone-noauth-nossl - standalone-noauth-nossl
- async - async
- pr - pr
- name: test-server-version-pypy3.11-sync-noauth-nossl-standalone - name: test-server-version-pypy3.11-sync-noauth-nossl-standalone-cov
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
TOOLCHAIN_VERSION: pypy3.11 TOOLCHAIN_VERSION: pypy3.11
TEST_NAME: default_sync TEST_NAME: default_sync
tags: tags:
@ -3313,20 +3280,18 @@ tasks:
- standalone-noauth-nossl - standalone-noauth-nossl
- sync - sync
- pr - pr
- name: test-server-version-python3.14-async-noauth-ssl-standalone-cov - name: test-server-version-python3.14-async-noauth-ssl-standalone
commands: commands:
- func: run server - func: run server
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: standalone TOPOLOGY: standalone
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -4082,7 +4047,7 @@ tasks:
- standalone-noauth-nossl - standalone-noauth-nossl
- async - async
- pypy - pypy
- name: test-standard-latest-python3.12-async-noauth-ssl-replica-set - name: test-standard-latest-python3.12-async-noauth-ssl-replica-set-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4090,12 +4055,14 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.12" TOOLCHAIN_VERSION: "3.12"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -4128,7 +4095,7 @@ tasks:
- replica_set-noauth-ssl - replica_set-noauth-ssl
- async - async
- pypy - pypy
- name: test-standard-latest-python3.13-async-auth-ssl-sharded-cluster - name: test-standard-latest-python3.13-async-auth-ssl-sharded-cluster-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4136,12 +4103,14 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -4151,7 +4120,7 @@ tasks:
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- async - async
- pr - pr
- name: test-standard-latest-python3.11-async-noauth-nossl-standalone - name: test-standard-latest-python3.11-async-noauth-nossl-standalone-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4159,12 +4128,14 @@ tasks:
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -4174,7 +4145,7 @@ tasks:
- standalone-noauth-nossl - standalone-noauth-nossl
- async - async
- pr - pr
- name: test-standard-latest-python3.14-async-noauth-nossl-standalone - name: test-standard-latest-python3.14-async-noauth-nossl-standalone-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4182,12 +4153,14 @@ tasks:
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
TEST_NAME: default_async TEST_NAME: default_async
tags: tags:
@ -4829,7 +4802,7 @@ tasks:
- python-3.13 - python-3.13
- standalone-noauth-nossl - standalone-noauth-nossl
- noauth - noauth
- name: test-non-standard-latest-python3.14t-noauth-ssl-replica-set - name: test-non-standard-latest-python3.14t-noauth-ssl-replica-set-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4837,12 +4810,14 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: ssl SSL: ssl
TOPOLOGY: replica_set TOPOLOGY: replica_set
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: 3.14t TOOLCHAIN_VERSION: 3.14t
tags: tags:
- test-non-standard - test-non-standard
@ -4874,7 +4849,7 @@ tasks:
- replica_set-noauth-ssl - replica_set-noauth-ssl
- noauth - noauth
- pypy - pypy
- name: test-non-standard-latest-python3.14-auth-ssl-sharded-cluster - name: test-non-standard-latest-python3.14-auth-ssl-sharded-cluster-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4882,12 +4857,14 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
tags: tags:
- test-non-standard - test-non-standard
@ -4896,7 +4873,7 @@ tasks:
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- auth - auth
- pr - pr
- name: test-non-standard-latest-python3.13-noauth-nossl-standalone - name: test-non-standard-latest-python3.13-noauth-nossl-standalone-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -4904,12 +4881,14 @@ tasks:
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: noauth AUTH: noauth
SSL: nossl SSL: nossl
TOPOLOGY: standalone TOPOLOGY: standalone
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.13" TOOLCHAIN_VERSION: "3.13"
tags: tags:
- test-non-standard - test-non-standard
@ -5007,7 +4986,7 @@ tasks:
- pypy - pypy
# Test numpy tests # Test numpy tests
- name: test-numpy-python3.10 - name: test-numpy-python3.10-python3.10
commands: commands:
- func: test numpy - func: test numpy
vars: vars:
@ -5017,16 +4996,18 @@ tasks:
- vector - vector
- python-3.10 - python-3.10
- test-numpy - test-numpy
- name: test-numpy-python3.14 - name: test-numpy-python3.14-python3.14-cov
commands: commands:
- func: test numpy - func: test numpy
vars: vars:
TOOLCHAIN_VERSION: "3.14" TOOLCHAIN_VERSION: "3.14"
COVERAGE: "1"
tags: tags:
- binary - binary
- vector - vector
- python-3.14 - python-3.14
- test-numpy - test-numpy
- pr
# Test standard auth tests # Test standard auth tests
- name: test-standard-auth-v4.2-python3.10-auth-ssl-sharded-cluster-min-deps - name: test-standard-auth-v4.2-python3.10-auth-ssl-sharded-cluster-min-deps
@ -5290,7 +5271,7 @@ tasks:
- sharded_cluster-auth-ssl - sharded_cluster-auth-ssl
- auth - auth
- pypy - pypy
- name: test-standard-auth-latest-python3.11-auth-ssl-sharded-cluster - name: test-standard-auth-latest-python3.11-auth-ssl-sharded-cluster-cov
commands: commands:
- func: run server - func: run server
vars: vars:
@ -5298,12 +5279,14 @@ tasks:
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
- func: run tests - func: run tests
vars: vars:
AUTH: auth AUTH: auth
SSL: ssl SSL: ssl
TOPOLOGY: sharded_cluster TOPOLOGY: sharded_cluster
VERSION: latest VERSION: latest
COVERAGE: "1"
TOOLCHAIN_VERSION: "3.11" TOOLCHAIN_VERSION: "3.11"
tags: tags:
- test-standard-auth - test-standard-auth

View File

@ -368,7 +368,6 @@ buildvariants:
run_on: run_on:
- rhel87-small - rhel87-small
expansions: expansions:
COVERAGE: "1"
NO_EXT: "1" NO_EXT: "1"
# No server tests # No server tests
@ -420,6 +419,8 @@ buildvariants:
run_on: run_on:
- ubuntu2204-small - ubuntu2204-small
batchtime: 1440 batchtime: 1440
expansions:
COVERAGE: "1"
tags: [pr] tags: [pr]
- name: auth-oidc-macos - name: auth-oidc-macos
tasks: tasks:

View File

@ -318,7 +318,7 @@ def create_green_framework_variants():
def create_no_c_ext_variants(): def create_no_c_ext_variants():
host = DEFAULT_HOST host = DEFAULT_HOST
tasks = [".test-standard"] tasks = [".test-standard"]
expansions = dict(COVERAGE="1") expansions = dict()
handle_c_ext(C_EXTS[0], expansions) handle_c_ext(C_EXTS[0], expansions)
display_name = get_variant_name("No C Ext", host) display_name = get_variant_name("No C Ext", host)
return [create_variant(tasks, display_name, host=host, expansions=expansions)] return [create_variant(tasks, display_name, host=host, expansions=expansions)]
@ -344,8 +344,12 @@ def create_test_numpy_tasks():
tasks = [] tasks = []
for python in MIN_MAX_PYTHON: for python in MIN_MAX_PYTHON:
tags = ["binary", "vector", f"python-{python}", "test-numpy"] tags = ["binary", "vector", f"python-{python}", "test-numpy"]
task_name = get_task_name("test-numpy", python=python) vars = dict(TOOLCHAIN_VERSION=python)
test_func = FunctionCall(func="test numpy", vars=dict(TOOLCHAIN_VERSION=python)) if python == MIN_MAX_PYTHON[-1]:
tags.append("pr")
vars["COVERAGE"] = "1"
task_name = get_task_name("test-numpy", python=python, **vars)
test_func = FunctionCall(func="test numpy", vars=vars)
tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func]))
return tasks return tasks
@ -397,6 +401,7 @@ def create_oidc_auth_variants():
tags=["pr"], tags=["pr"],
host=host, host=host,
batchtime=BATCHTIME_DAY, batchtime=BATCHTIME_DAY,
expansions=dict(COVERAGE="1"),
) )
) )
return variants return variants
@ -596,7 +601,7 @@ def create_server_version_tasks():
expansions["TEST_MIN_DEPS"] = "1" expansions["TEST_MIN_DEPS"] = "1"
if "t" in python: if "t" in python:
tags.append("free-threaded") tags.append("free-threaded")
if python not in PYPYS and "t" not in python: if "pr" in tags:
expansions["COVERAGE"] = "1" expansions["COVERAGE"] = "1"
name = get_task_name( name = get_task_name(
"test-server-version", "test-server-version",
@ -661,6 +666,8 @@ def create_test_non_standard_tasks():
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
if python == ALL_PYTHONS[0]: if python == ALL_PYTHONS[0]:
expansions["TEST_MIN_DEPS"] = "1" expansions["TEST_MIN_DEPS"] = "1"
elif pr:
expansions["COVERAGE"] = "1"
name = get_task_name("test-non-standard", python=python, **expansions) name = get_task_name("test-non-standard", python=python, **expansions)
server_func = FunctionCall(func="run server", vars=expansions) server_func = FunctionCall(func="run server", vars=expansions)
test_vars = expansions.copy() test_vars = expansions.copy()
@ -703,6 +710,8 @@ def create_test_standard_auth_tasks():
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
if python == ALL_PYTHONS[0]: if python == ALL_PYTHONS[0]:
expansions["TEST_MIN_DEPS"] = "1" expansions["TEST_MIN_DEPS"] = "1"
elif pr:
expansions["COVERAGE"] = "1"
name = get_task_name("test-standard-auth", python=python, **expansions) name = get_task_name("test-standard-auth", python=python, **expansions)
server_func = FunctionCall(func="run server", vars=expansions) server_func = FunctionCall(func="run server", vars=expansions)
test_vars = expansions.copy() test_vars = expansions.copy()
@ -741,6 +750,8 @@ def create_standard_tasks():
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version) expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology, VERSION=version)
if python == ALL_PYTHONS[0]: if python == ALL_PYTHONS[0]:
expansions["TEST_MIN_DEPS"] = "1" expansions["TEST_MIN_DEPS"] = "1"
elif pr:
expansions["COVERAGE"] = "1"
name = get_task_name("test-standard", python=python, sync=sync, **expansions) name = get_task_name("test-standard", python=python, sync=sync, **expansions)
server_func = FunctionCall(func="run server", vars=expansions) server_func = FunctionCall(func="run server", vars=expansions)
test_vars = expansions.copy() test_vars = expansions.copy()
@ -810,8 +821,11 @@ def create_aws_tasks():
if "t" in python: if "t" in python:
tags.append("free-threaded") tags.append("free-threaded")
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, TOOLCHAIN_VERSION=python) test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, TOOLCHAIN_VERSION=python)
if python == ALL_PYTHONS[0]: if python == MIN_MAX_PYTHON[0]:
test_vars["TEST_MIN_DEPS"] = "1" test_vars["TEST_MIN_DEPS"] = "1"
elif python == MIN_MAX_PYTHON[-1]:
tags.append("pr")
test_vars["COVERAGE"] = "1"
name = get_task_name(f"{base_name}-{test_type}", **test_vars) name = get_task_name(f"{base_name}-{test_type}", **test_vars)
test_func = FunctionCall(func="run tests", vars=test_vars) test_func = FunctionCall(func="run tests", vars=test_vars)
funcs = [server_func, assume_func, test_func] funcs = [server_func, assume_func, test_func]
@ -849,11 +863,11 @@ def create_oidc_tasks():
tasks = [] tasks = []
for sub_test in ["default", "azure", "gcp", "eks", "aks", "gke"]: for sub_test in ["default", "azure", "gcp", "eks", "aks", "gke"]:
vars = dict(TEST_NAME="auth_oidc", SUB_TEST_NAME=sub_test) vars = dict(TEST_NAME="auth_oidc", SUB_TEST_NAME=sub_test)
test_func = FunctionCall(func="run tests", vars=vars)
task_name = f"test-auth-oidc-{sub_test}"
tags = ["auth_oidc"] tags = ["auth_oidc"]
if sub_test != "default": if sub_test != "default":
tags.append("auth_oidc_remote") tags.append("auth_oidc_remote")
test_func = FunctionCall(func="run tests", vars=vars)
task_name = get_task_name(f"test-auth-oidc-{sub_test}", **vars)
tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func]))
return tasks return tasks
@ -903,14 +917,14 @@ def _create_ocsp_tasks(algo, variant, server_type, base_task_name):
) )
if python == ALL_PYTHONS[0]: if python == ALL_PYTHONS[0]:
vars["TEST_MIN_DEPS"] = "1" vars["TEST_MIN_DEPS"] = "1"
test_func = FunctionCall(func="run tests", vars=vars)
tags = ["ocsp", f"ocsp-{algo}", version] tags = ["ocsp", f"ocsp-{algo}", version]
if "disableStapling" not in variant: if "disableStapling" not in variant:
tags.append("ocsp-staple") tags.append("ocsp-staple")
if algo == "valid-cert-server-staples" and version == "latest": if base_task_name == "valid-cert-server-staples" and version == "latest":
tags.append("pr") tags.append("pr")
if "TEST_MIN_DEPS" not in vars:
vars["COVERAGE"] = "1"
test_func = FunctionCall(func="run tests", vars=vars)
task_name = get_task_name(f"test-ocsp-{algo}-{base_task_name}", **vars) task_name = get_task_name(f"test-ocsp-{algo}-{base_task_name}", **vars)
tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func]))
@ -1087,7 +1101,7 @@ def create_upload_coverage_codecov_func():
"github_pr_number", "github_pr_number",
"github_pr_head_branch", "github_pr_head_branch",
"github_author", "github_author",
"is_patch", "requester",
"branch_name", "branch_name",
] ]
args = [ args = [
@ -1230,7 +1244,7 @@ def create_run_tests_func():
def create_test_numpy_func(): def create_test_numpy_func():
includes = ["TOOLCHAIN_VERSION"] includes = ["TOOLCHAIN_VERSION", "COVERAGE"]
test_cmd = get_subprocess_exec( test_cmd = get_subprocess_exec(
include_expansions_in_env=includes, args=[".evergreen/just.sh", "test-numpy"] include_expansions_in_env=includes, args=[".evergreen/just.sh", "test-numpy"]
) )

View File

@ -4,7 +4,9 @@ import json
import logging import logging
import os import os
import platform import platform
import shlex
import shutil import shutil
import subprocess
import sys import sys
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
@ -202,6 +204,16 @@ def run() -> None:
if os.environ.get("DEBUG_LOG"): if os.environ.get("DEBUG_LOG"):
TEST_ARGS.extend(f"-o log_cli_level={logging.DEBUG}".split()) TEST_ARGS.extend(f"-o log_cli_level={logging.DEBUG}".split())
if os.environ.get("COVERAGE"):
binary = sys.executable.replace(os.sep, "/")
cmd = f"{binary} -m coverage run -m pytest {' '.join(TEST_ARGS)} {' '.join(sys.argv[1:])}"
result = subprocess.run(shlex.split(cmd), check=False) # noqa: S603
cmd = f"{binary} -m coverage report"
subprocess.run(shlex.split(cmd), check=False) # noqa: S603
if result.returncode != 0:
print(result.stderr)
sys.exit(result.returncode)
# Run local tests. # Run local tests.
ret = pytest.main(TEST_ARGS + sys.argv[1:]) ret = pytest.main(TEST_ARGS + sys.argv[1:])
if ret != 0: if ret != 0:

View File

@ -431,6 +431,9 @@ def handle_test_env() -> None:
# We do not want the default client_context to be initialized. # We do not want the default client_context to be initialized.
write_env("DISABLE_CONTEXT") write_env("DISABLE_CONTEXT")
if test_name == "numpy":
UV_ARGS.append("--with numpy")
if test_name == "perf": if test_name == "perf":
data_dir = ROOT / "specifications/source/benchmarking/data" data_dir = ROOT / "specifications/source/benchmarking/data"
if not data_dir.exists(): if not data_dir.exists():
@ -458,7 +461,6 @@ def handle_test_env() -> None:
# Keep in sync with combine-coverage.sh. # Keep in sync with combine-coverage.sh.
# coverage >=5 is needed for relative_files=true. # coverage >=5 is needed for relative_files=true.
UV_ARGS.append("--group coverage") UV_ARGS.append("--group coverage")
TEST_ARGS = f"{TEST_ARGS} --cov"
write_env("COVERAGE") write_env("COVERAGE")
if opts.green_framework: if opts.green_framework:

View File

@ -8,18 +8,20 @@ ROOT=$(dirname "$(dirname $HERE)")
pushd $ROOT > /dev/null pushd $ROOT > /dev/null
export FNAME=coverage.xml export FNAME=coverage.xml
REQUESTER=${requester:-}
if [ -n "${is_patch:-}" ]; then
echo "This is a patch build, not running codecov"
exit 0
fi
if [ ! -f ".coverage" ]; then if [ ! -f ".coverage" ]; then
echo "There are no coverage results, not running codecov" echo "There are no coverage results, not running codecov"
exit 0 exit 0
fi fi
echo "Uploading..." if [[ "${REQUESTER}" == "github_pr" || "${REQUESTER}" == "commit" ]]; then
echo "Uploading codecov for $REQUESTER..."
else
echo "Error: requester must be 'github_pr' or 'commit', got '${REQUESTER}'" >&2
exit 1
fi
printf 'sha: %s\n' "$github_commit" printf 'sha: %s\n' "$github_commit"
printf 'flag: %s-%s\n' "$build_variant" "$task_name" printf 'flag: %s-%s\n' "$build_variant" "$task_name"
printf 'file: %s\n' "$FNAME" printf 'file: %s\n' "$FNAME"
@ -40,18 +42,16 @@ codecov_args=(
if [ -n "${github_pr_number:-}" ]; then if [ -n "${github_pr_number:-}" ]; then
printf 'branch: %s:%s\n' "$github_author" "$github_pr_head_branch" printf 'branch: %s:%s\n' "$github_author" "$github_pr_head_branch"
printf 'pr: %s\n' "$github_pr_number" printf 'pr: %s\n' "$github_pr_number"
uv tool run --from codecov-cli codecovcli \ uv tool run --from codecov-cli codecovcli \
"${codecov_args[@]}" \ "${codecov_args[@]}" \
--pr "${github_pr_number}" \ --pr "${github_pr_number}" \
--branch "${github_author}:${github_pr_head_branch}" --branch "${github_author}:${github_pr_head_branch}"
else else
printf 'branch: %s\n' "$branch_name" printf 'branch: %s\n' "$branch_name"
uv tool run --from codecov-cli codecovcli \ uv tool run --from codecov-cli codecovcli \
"${codecov_args[@]}" \ "${codecov_args[@]}" \
--branch "${branch_name}" --branch "${branch_name}"
fi fi
echo "Uploading...done." echo "Uploading codecov for $REQUESTER... done."
popd > /dev/null popd > /dev/null

View File

@ -44,6 +44,7 @@ TEST_SUITE_MAP = {
"mockupdb": "mockupdb", "mockupdb": "mockupdb",
"ocsp": "ocsp", "ocsp": "ocsp",
"perf": "perf", "perf": "perf",
"numpy": "",
} }
# Tests that require a sub test suite. # Tests that require a sub test suite.

View File

@ -60,8 +60,9 @@ test *args="-v --durations=5 --maxfail=10": && resync
uv run --extra test python -m pytest {{args}} uv run --extra test python -m pytest {{args}}
[group('test')] [group('test')]
test-numpy: && resync test-numpy *args="": && resync
uv run --extra test --with numpy python -m pytest test/test_bson.py just setup-tests numpy {{args}}
just run-tests test/test_bson.py
[group('test')] [group('test')]
run-tests *args: && resync run-tests *args: && resync

View File

@ -51,7 +51,6 @@ dev = []
pip = ["pip>=20.2"] pip = ["pip>=20.2"]
gevent = ["gevent>=21.12"] gevent = ["gevent>=21.12"]
coverage = [ coverage = [
"pytest-cov>=4.0.0",
"coverage[toml]>=5,<=7.10.7" "coverage[toml]>=5,<=7.10.7"
] ]
mockupdb = [ mockupdb = [

View File

@ -48,19 +48,11 @@ from pymongo.write_concern import WriteConcern
_HAVE_PYOPENSSL = False _HAVE_PYOPENSSL = False
try: try:
# All of these must be available to use PyOpenSSL from pymongo import pyopenssl_context
import OpenSSL
import requests
import service_identity
# Ensure service_identity>=18.1 is installed
from service_identity.pyopenssl import verify_ip_address
from pymongo.ocsp_support import _load_trusted_ca_certs
_HAVE_PYOPENSSL = True _HAVE_PYOPENSSL = True
except ImportError: except ImportError:
_load_trusted_ca_certs = None # type: ignore pass
if HAVE_SSL: if HAVE_SSL:
@ -136,11 +128,6 @@ class TestClientSSL(AsyncPyMongoTestCase):
def test_use_pyopenssl_when_available(self): def test_use_pyopenssl_when_available(self):
self.assertTrue(HAVE_PYSSL) self.assertTrue(HAVE_PYSSL)
@unittest.skipUnless(_HAVE_PYOPENSSL, "Cannot test without PyOpenSSL")
def test_load_trusted_ca_certs(self):
trusted_ca_certs = _load_trusted_ca_certs(CA_BUNDLE_PEM)
self.assertEqual(2, len(trusted_ca_certs))
class TestSSL(AsyncIntegrationTest): class TestSSL(AsyncIntegrationTest):
saved_port: int saved_port: int

View File

@ -48,19 +48,11 @@ from pymongo.write_concern import WriteConcern
_HAVE_PYOPENSSL = False _HAVE_PYOPENSSL = False
try: try:
# All of these must be available to use PyOpenSSL from pymongo import pyopenssl_context
import OpenSSL
import requests
import service_identity
# Ensure service_identity>=18.1 is installed
from service_identity.pyopenssl import verify_ip_address
from pymongo.ocsp_support import _load_trusted_ca_certs
_HAVE_PYOPENSSL = True _HAVE_PYOPENSSL = True
except ImportError: except ImportError:
_load_trusted_ca_certs = None # type: ignore pass
if HAVE_SSL: if HAVE_SSL:
@ -136,11 +128,6 @@ class TestClientSSL(PyMongoTestCase):
def test_use_pyopenssl_when_available(self): def test_use_pyopenssl_when_available(self):
self.assertTrue(HAVE_PYSSL) self.assertTrue(HAVE_PYSSL)
@unittest.skipUnless(_HAVE_PYOPENSSL, "Cannot test without PyOpenSSL")
def test_load_trusted_ca_certs(self):
trusted_ca_certs = _load_trusted_ca_certs(CA_BUNDLE_PEM)
self.assertEqual(2, len(trusted_ca_certs))
class TestSSL(IntegrationTest): class TestSSL(IntegrationTest):
saved_port: int saved_port: int

21
uv.lock generated
View File

@ -1562,7 +1562,6 @@ zstd = [
[package.dev-dependencies] [package.dev-dependencies]
coverage = [ coverage = [
{ name = "coverage", extra = ["toml"] }, { name = "coverage", extra = ["toml"] },
{ name = "pytest-cov" },
] ]
gevent = [ gevent = [
{ name = "gevent" }, { name = "gevent" },
@ -1612,10 +1611,7 @@ requires-dist = [
provides-extras = ["aws", "docs", "encryption", "gssapi", "ocsp", "snappy", "test", "zstd"] provides-extras = ["aws", "docs", "encryption", "gssapi", "ocsp", "snappy", "test", "zstd"]
[package.metadata.requires-dev] [package.metadata.requires-dev]
coverage = [ coverage = [{ name = "coverage", extras = ["toml"], specifier = ">=5,<=7.10.7" }]
{ name = "coverage", extras = ["toml"], specifier = ">=5,<=7.10.7" },
{ name = "pytest-cov", specifier = ">=4.0.0" },
]
dev = [] dev = []
gevent = [{ name = "gevent", specifier = ">=21.12" }] gevent = [{ name = "gevent", specifier = ">=21.12" }]
mockupdb = [{ name = "mockupdb", git = "https://github.com/mongodb-labs/mongo-mockup-db?rev=master" }] mockupdb = [{ name = "mockupdb", git = "https://github.com/mongodb-labs/mongo-mockup-db?rev=master" }]
@ -1763,21 +1759,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" }, { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" },
] ]
[[package]]
name = "pytest-cov"
version = "7.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "coverage", extra = ["toml"] },
{ name = "pluggy" },
{ name = "pytest", version = "8.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
{ name = "pytest", version = "9.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/5e/f7/c933acc76f5208b3b00089573cf6a2bc26dc80a8aece8f52bb7d6b1855ca/pytest_cov-7.0.0.tar.gz", hash = "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1", size = 54328, upload-time = "2025-09-09T10:57:02.113Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/ee/49/1377b49de7d0c1ce41292161ea0f721913fa8722c19fb9c1e3aa0367eecb/pytest_cov-7.0.0-py3-none-any.whl", hash = "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861", size = 22424, upload-time = "2025-09-09T10:57:00.695Z" },
]
[[package]] [[package]]
name = "python-dateutil" name = "python-dateutil"
version = "2.9.0.post0" version = "2.9.0.post0"