]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't run vulture on ansX system test dirs 12236/head
authorNicki Křížek <nicki@isc.org>
Tue, 16 Jun 2026 16:56:05 +0000 (18:56 +0200)
committerEvan Hunt <each@isc.org>
Wed, 17 Jun 2026 02:07:06 +0000 (19:07 -0700)
Exclude ansX directories from vulture, as splitting up the handlers into
multiple files gets flagged as unused code.

bin/tests/system/COOKBOOK.md
pyproject.toml

index 4339b5ffe75007900451fd145ab2cb9d10e65c7e..e0c718809425d03259b20a2830fa2815001e2d09 100644 (file)
@@ -226,18 +226,17 @@ server's default rcode (REFUSED unless configured otherwise).
 
 When one mock server accrues several unrelated domains — typical for a
 shared `ansN` in a multi-module family directory — keep each domain's
-handler logic in its own module: one `<domain>_ans.py` file per domain next
-to `ans.py`, with `ans.py` reduced to a loader that imports and installs
-each handler (the test directory is on the server's `PYTHONPATH`):
+handler logic in its own module next to `ans.py`, with `ans.py` reduced
+to a loader that imports and installs each handler:
 
 ```python
-from mytest.ans4 import broken_example_ans
+from mytest.ans4 import broken_example
 from isctest.asyncserver import AsyncDnsServer
 
 
 def main() -> None:
     server = AsyncDnsServer()
-    server.install_response_handler(broken_example_ans.BrokenExampleHandler())
+    server.install_response_handler(broken_example.BrokenExampleHandler())
     server.run()
 
 
index 308c1275685c6a7bee46d15deb02e6be35069d45..c9cc80a4dac5f5871b23fc72776bc674d1746e5d 100644 (file)
@@ -67,6 +67,7 @@ paths = [
 ]
 exclude = [
   "*ans.py",
+  "*/ans[0-9]*/*",
   "contrib",
   "*doc/arm/_ext/*conf.py",
   "doc/arm/conf.py",