From 0512221fd9a75a5c419a7c0d6e6e9f5d34b6e4de Mon Sep 17 00:00:00 2001 From: Manish Kumar Date: Fri, 25 Sep 2026 01:37:49 -0500 Subject: [PATCH] test: measure greenlet coverage and require 98% Playwright's sync API runs browser test code inside greenlets, which coverage.py drops unless greenlet concurrency is enabled. Enabling it raises measured coverage from 95.03% to 98.67%, so raise the floor to 98%. Co-Authored-By: Claude Opus 5.5 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d72581..ef5e37b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.pytest.ini_options] -addopts = "--cov=tests --cov-report=term-missing --cov-fail-under=95" +addopts = "--cov=tests --cov-report=term-missing --cov-fail-under=98" markers = [ "docker: tests that build and exercise the nginx image through Docker", ] @@ -12,6 +12,9 @@ markers = [ # out of the coverage measurement rather than deleted outright -- that's a # repo-hygiene call for whoever owns this repo, not this change. omit = ["tests/test_video_service.py"] +# Playwright's sync API drives the browser from greenlets; without greenlet +# support coverage.py silently drops every line executed inside them. +concurrency = ["thread", "greenlet"] [tool.coverage.report] omit = ["tests/test_video_service.py"]