about summary refs log tree commit diff
path: root/tst/test_listen.py
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-05-29 00:58:44 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-05-29 00:58:44 +0900
commitdbfc5f4ff56ec65ec04a558d8715f1df7844dffa (patch)
treee7b7dcdc8267d114e2634dd6ee10be73327b659a /tst/test_listen.py
parent9b9e25d1d042e315b745aba73f30501e6ab07edb (diff)
downloadscadere-dbfc5f4ff56ec65ec04a558d8715f1df7844dffa.tar.gz
Add unlikely examples for branch coverage
Diffstat (limited to 'tst/test_listen.py')
-rw-r--r--tst/test_listen.py3
1 files changed, 2 insertions, 1 deletions
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):