We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e49e49f commit 3ec028bCopy full SHA for 3ec028b
tests/detectors/test_detectors.py
@@ -36,11 +36,13 @@ def test_detector_structure(classname):
36
m = importlib.import_module("garak." + ".".join(classname.split(".")[:-1]))
37
d = getattr(m, classname.split(".")[-1])
38
39
+ detect_signature = inspect.signature(d.detect)
40
+
41
# has method detect
42
assert "detect" in dir(d), f"detector {classname} must have a method detect"
43
# _call_model has a generations_this_call param
44
assert (
- "attempt" in inspect.signature(d.detect).parameters
45
+ "attempt" in detect_signature.parameters
46
), f"{classname}.detect() must accept parameter attempt"
47
# any parameter that has a default must be supported
48
unsupported_defaults = []
0 commit comments