From dbfc5f4ff56ec65ec04a558d8715f1df7844dffa Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 29 May 2025 00:58:44 +0900 Subject: Add unlikely examples for branch coverage --- tst/test_listen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tst/test_listen.py') diff --git a/tst/test_listen.py b/tst/test_listen.py index ec98140..72e4968 100644 --- a/tst/test_listen.py +++ b/tst/test_listen.py @@ -31,7 +31,7 @@ from xml.etree.ElementTree import (XML, XMLParser, indent, tostring as str_from_xml) from xml.sax.saxutils import escape -from hypothesis import HealthCheck, given, settings +from hypothesis import HealthCheck, example, given, settings from hypothesis.strategies import (builds, composite, data, datetimes, integers, lists, text) from hypothesis.provisional import domains, urls @@ -209,6 +209,7 @@ async def test_http_200(base_url, certs): page.find('.//dl', XHTML_NAMESPACES)) +@example(type('//', (), {'draw': lambda *a, **kw: 'https://a.example//b'})) @given(data()) @settings(suppress_health_check=[HealthCheck.too_slow]) async def test_http_404(drawer): -- cgit 1.4.1