hand-claim-audit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hand_claim_audit-0.1.0/LICENSE +21 -0
- hand_claim_audit-0.1.0/MANIFEST.in +2 -0
- hand_claim_audit-0.1.0/PKG-INFO +59 -0
- hand_claim_audit-0.1.0/README.md +47 -0
- hand_claim_audit-0.1.0/hand_claim_audit/__init__.py +1 -0
- hand_claim_audit-0.1.0/hand_claim_audit/__main__.py +3 -0
- hand_claim_audit-0.1.0/hand_claim_audit/audit.py +183 -0
- hand_claim_audit-0.1.0/hand_claim_audit/phrases.py +95 -0
- hand_claim_audit-0.1.0/hand_claim_audit.egg-info/PKG-INFO +59 -0
- hand_claim_audit-0.1.0/hand_claim_audit.egg-info/SOURCES.txt +25 -0
- hand_claim_audit-0.1.0/hand_claim_audit.egg-info/dependency_links.txt +1 -0
- hand_claim_audit-0.1.0/hand_claim_audit.egg-info/entry_points.txt +2 -0
- hand_claim_audit-0.1.0/hand_claim_audit.egg-info/top_level.txt +1 -0
- hand_claim_audit-0.1.0/pyproject.toml +18 -0
- hand_claim_audit-0.1.0/setup.cfg +4 -0
- hand_claim_audit-0.1.0/tests/__init__.py +0 -0
- hand_claim_audit-0.1.0/tests/fixtures/bad/README.md +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/bad/app.py +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/good/README.md +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/good/app.py +2 -0
- hand_claim_audit-0.1.0/tests/fixtures/noclaim/README.md +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/noclaim/app.py +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/nohand/README.md +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/nohand/app.py +2 -0
- hand_claim_audit-0.1.0/tests/fixtures/testonly/README.md +1 -0
- hand_claim_audit-0.1.0/tests/fixtures/testonly/tests/test_provider.py +2 -0
- hand_claim_audit-0.1.0/tests/test_audit.py +182 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hand-claim-audit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hand-claim-audit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Offline audit of documentation against Python vision evidence
|
|
5
|
+
License: MIT
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# hand-claim-audit
|
|
14
|
+
|
|
15
|
+
An offline checker comparing Markdown promises about hand-related vision capabilities with static Python source evidence. Version 0.1.0 requires Python 3.9 or later and has no runtime dependencies.
|
|
16
|
+
|
|
17
|
+
Install and run:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
python3 -m pip install hand-claim-audit
|
|
21
|
+
hand-claim-audit . --json
|
|
22
|
+
python3 -m hand_claim_audit . --verbose
|
|
23
|
+
hand-claim-audit . --ignore 'vendor/*' --fail-on MEDIUM
|
|
24
|
+
hand-claim-audit --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The input is one root directory. Documentation includes its README.md and Markdown files beneath any docs path component. Backtick and tilde fences are excluded; inline code counts. Paragraphs are joined across line breaks, lowercased, and normalized for contractions, hyphens, and whitespace. Exact templates use word boundaries and longer matches take priority. Negative spans are removed before positive matching.
|
|
28
|
+
|
|
29
|
+
For example, these templates are evaluated:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
detects hands
|
|
33
|
+
does not detect hands
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Evidence comes from provider-resolved MediaPipe Hands and cvzone HandDetector construction or calls to process and findHands on corresponding bound objects. Imports and aliases are resolved within each module. Assignment, annotated assignment, context-manager bindings, attributes, and chained construction are supported. Local definitions shadow imported names.
|
|
37
|
+
|
|
38
|
+
Bare imports, image loading, camera capture, supplied landmark drawing, face or pose operations, arbitrary strings, shell commands, and unbound methods do not provide evidence. Source is parsed with ast and never executed. Invalid syntax contributes no evidence. Symlinked files and directories are skipped. Python beneath fixtures, docs, or examples is excluded; files beneath tests or named test_*.py or *_test.py count separately.
|
|
39
|
+
|
|
40
|
+
Rules (at most one finding per family):
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
documented-hand-claim-false: HIGH without production evidence; MEDIUM with test evidence only.
|
|
44
|
+
documented-no-hand-claim-false: HIGH when production evidence contradicts a negative claim.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A project with no matching documentation passes. The default threshold is HIGH; selecting MEDIUM also fails on test-only findings. Exit status is 0 for PASS, 2 for FAIL, and 1 for invalid input, unreadable roots, or usage errors. JSON includes verdict, findings (rule, severity, message), and files_scanned. Human output includes a verdict and findings; verbose mode adds a scanned-file count. Ignore patterns are repeatable fnmatch globs against relative POSIX paths.
|
|
48
|
+
|
|
49
|
+
This is a static heuristic, not proof that a feature works. Construction alone is sufficient. Dynamic imports, cross-module bindings, runtime control flow, and provider behavior are not evaluated. No model execution, network access, or dependency import is needed.
|
|
50
|
+
|
|
51
|
+
Development checks:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
python3 -m unittest discover
|
|
55
|
+
python3 -m build
|
|
56
|
+
python3 -m hand_claim_audit .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The source distribution includes tests and fixtures. Licensed under MIT.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# hand-claim-audit
|
|
2
|
+
|
|
3
|
+
An offline checker comparing Markdown promises about hand-related vision capabilities with static Python source evidence. Version 0.1.0 requires Python 3.9 or later and has no runtime dependencies.
|
|
4
|
+
|
|
5
|
+
Install and run:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
python3 -m pip install hand-claim-audit
|
|
9
|
+
hand-claim-audit . --json
|
|
10
|
+
python3 -m hand_claim_audit . --verbose
|
|
11
|
+
hand-claim-audit . --ignore 'vendor/*' --fail-on MEDIUM
|
|
12
|
+
hand-claim-audit --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The input is one root directory. Documentation includes its README.md and Markdown files beneath any docs path component. Backtick and tilde fences are excluded; inline code counts. Paragraphs are joined across line breaks, lowercased, and normalized for contractions, hyphens, and whitespace. Exact templates use word boundaries and longer matches take priority. Negative spans are removed before positive matching.
|
|
16
|
+
|
|
17
|
+
For example, these templates are evaluated:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
detects hands
|
|
21
|
+
does not detect hands
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Evidence comes from provider-resolved MediaPipe Hands and cvzone HandDetector construction or calls to process and findHands on corresponding bound objects. Imports and aliases are resolved within each module. Assignment, annotated assignment, context-manager bindings, attributes, and chained construction are supported. Local definitions shadow imported names.
|
|
25
|
+
|
|
26
|
+
Bare imports, image loading, camera capture, supplied landmark drawing, face or pose operations, arbitrary strings, shell commands, and unbound methods do not provide evidence. Source is parsed with ast and never executed. Invalid syntax contributes no evidence. Symlinked files and directories are skipped. Python beneath fixtures, docs, or examples is excluded; files beneath tests or named test_*.py or *_test.py count separately.
|
|
27
|
+
|
|
28
|
+
Rules (at most one finding per family):
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
documented-hand-claim-false: HIGH without production evidence; MEDIUM with test evidence only.
|
|
32
|
+
documented-no-hand-claim-false: HIGH when production evidence contradicts a negative claim.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
A project with no matching documentation passes. The default threshold is HIGH; selecting MEDIUM also fails on test-only findings. Exit status is 0 for PASS, 2 for FAIL, and 1 for invalid input, unreadable roots, or usage errors. JSON includes verdict, findings (rule, severity, message), and files_scanned. Human output includes a verdict and findings; verbose mode adds a scanned-file count. Ignore patterns are repeatable fnmatch globs against relative POSIX paths.
|
|
36
|
+
|
|
37
|
+
This is a static heuristic, not proof that a feature works. Construction alone is sufficient. Dynamic imports, cross-module bindings, runtime control flow, and provider behavior are not evaluated. No model execution, network access, or dependency import is needed.
|
|
38
|
+
|
|
39
|
+
Development checks:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
python3 -m unittest discover
|
|
43
|
+
python3 -m build
|
|
44
|
+
python3 -m hand_claim_audit .
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The source distribution includes tests and fixtures. Licensed under MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"""Offline documentation and Python evidence inspection."""
|
|
2
|
+
import argparse
|
|
3
|
+
import ast
|
|
4
|
+
import fnmatch
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import re
|
|
9
|
+
|
|
10
|
+
from . import __version__
|
|
11
|
+
from .phrases import HAND, NOHAND
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _pattern(phrases):
|
|
15
|
+
return re.compile(r'\b(?:' + '|'.join(re.escape(p) for p in sorted(phrases, key=len, reverse=True)) + r')\b')
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def claims(text):
|
|
19
|
+
"""Return positive and negative claims after excluding fenced blocks."""
|
|
20
|
+
lines = []
|
|
21
|
+
fence = None
|
|
22
|
+
for line in text.splitlines():
|
|
23
|
+
match = re.match(r'^ {0,3}(`{3,}|~{3,})(.*)$', line)
|
|
24
|
+
if fence:
|
|
25
|
+
if match and match[1][0] == fence[0] and len(match[1]) >= len(fence) and not match[2].strip():
|
|
26
|
+
fence = None
|
|
27
|
+
continue
|
|
28
|
+
if match:
|
|
29
|
+
fence = match[1]
|
|
30
|
+
else:
|
|
31
|
+
lines.append(line)
|
|
32
|
+
positive = negative = False
|
|
33
|
+
for paragraph in re.split(r'\n\s*\n', '\n'.join(lines)):
|
|
34
|
+
normalized = ' '.join(paragraph.lower().replace("n't", ' not').replace('-', ' ').split())
|
|
35
|
+
negative = negative or bool(_pattern(NOHAND).search(normalized))
|
|
36
|
+
normalized = _pattern(NOHAND).sub(' ', normalized)
|
|
37
|
+
positive = positive or bool(_pattern(HAND).search(normalized))
|
|
38
|
+
return positive, negative
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def evidence(source):
|
|
42
|
+
"""Resolve provider aliases and bindings within a single module, never execute."""
|
|
43
|
+
try:
|
|
44
|
+
tree = ast.parse(source)
|
|
45
|
+
except SyntaxError:
|
|
46
|
+
return False
|
|
47
|
+
aliases = {}
|
|
48
|
+
bound = {}
|
|
49
|
+
shadowed = {node.name for node in ast.walk(tree) if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))}
|
|
50
|
+
for node in ast.walk(tree):
|
|
51
|
+
if isinstance(node, ast.Import):
|
|
52
|
+
for item in node.names:
|
|
53
|
+
aliases[item.asname or item.name.split('.')[0]] = item.name if item.asname else item.name.split('.')[0]
|
|
54
|
+
elif isinstance(node, ast.ImportFrom) and node.module:
|
|
55
|
+
for item in node.names:
|
|
56
|
+
aliases[item.asname or item.name] = node.module + '.' + item.name
|
|
57
|
+
for name in shadowed:
|
|
58
|
+
aliases.pop(name, None)
|
|
59
|
+
|
|
60
|
+
def key(node):
|
|
61
|
+
if isinstance(node, ast.Name):
|
|
62
|
+
return node.id
|
|
63
|
+
if isinstance(node, ast.Attribute):
|
|
64
|
+
base = key(node.value)
|
|
65
|
+
return base + '.' + node.attr if base else None
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
def resolve(node):
|
|
69
|
+
value = key(node)
|
|
70
|
+
if not value:
|
|
71
|
+
return ''
|
|
72
|
+
first, *rest = value.split('.')
|
|
73
|
+
return '.'.join([aliases.get(first, ''), *rest]) if first in aliases else ''
|
|
74
|
+
|
|
75
|
+
def constructor(node):
|
|
76
|
+
if not isinstance(node, ast.Call):
|
|
77
|
+
return None
|
|
78
|
+
path = resolve(node.func)
|
|
79
|
+
if path.startswith('mediapipe.') and path.endswith('.hands.Hands'):
|
|
80
|
+
return 'process'
|
|
81
|
+
if path == 'cvzone.HandTrackingModule.HandDetector':
|
|
82
|
+
return 'findHands'
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
# Iterate to support aliases of constructed objects irrespective of traversal order.
|
|
86
|
+
nodes = list(ast.walk(tree))
|
|
87
|
+
for _ in range(len(nodes) + 1):
|
|
88
|
+
changed = False
|
|
89
|
+
for node in nodes:
|
|
90
|
+
pairs = []
|
|
91
|
+
if isinstance(node, ast.Assign):
|
|
92
|
+
pairs = [(target, node.value) for target in node.targets]
|
|
93
|
+
elif isinstance(node, ast.AnnAssign):
|
|
94
|
+
pairs = [(node.target, node.value)]
|
|
95
|
+
elif isinstance(node, (ast.With, ast.AsyncWith)):
|
|
96
|
+
pairs = [(item.optional_vars, item.context_expr) for item in node.items]
|
|
97
|
+
for target, value in pairs:
|
|
98
|
+
name = key(target)
|
|
99
|
+
operation = constructor(value) or bound.get(key(value))
|
|
100
|
+
if name and operation and bound.get(name) != operation:
|
|
101
|
+
bound[name] = operation
|
|
102
|
+
changed = True
|
|
103
|
+
if not changed:
|
|
104
|
+
break
|
|
105
|
+
for node in nodes:
|
|
106
|
+
if constructor(node):
|
|
107
|
+
return True
|
|
108
|
+
if isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute):
|
|
109
|
+
operation = constructor(node.func.value) or bound.get(key(node.func.value))
|
|
110
|
+
if operation == node.func.attr:
|
|
111
|
+
return True
|
|
112
|
+
return False
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def audit(root, ignores=()):
|
|
116
|
+
root = Path(root)
|
|
117
|
+
if not root.is_dir():
|
|
118
|
+
raise ValueError('Root must be a readable directory')
|
|
119
|
+
positive = negative = production = testing = False
|
|
120
|
+
scanned = 0
|
|
121
|
+
def walk_error(error):
|
|
122
|
+
raise error
|
|
123
|
+
for directory, dirs, files in os.walk(root, onerror=walk_error, followlinks=False):
|
|
124
|
+
dirs[:] = sorted(d for d in dirs if not (Path(directory) / d).is_symlink() and not any(fnmatch.fnmatch((Path(directory) / d).relative_to(root).as_posix(), pat) for pat in ignores))
|
|
125
|
+
for filename in sorted(files):
|
|
126
|
+
path = Path(directory) / filename
|
|
127
|
+
relative = path.relative_to(root)
|
|
128
|
+
if path.is_symlink() or any(fnmatch.fnmatch(relative.as_posix(), pat) for pat in ignores):
|
|
129
|
+
continue
|
|
130
|
+
parts = relative.parts[:-1]
|
|
131
|
+
doc = relative.as_posix() == 'README.md' or (path.suffix == '.md' and 'docs' in parts)
|
|
132
|
+
excluded = any(p in ('fixtures', 'docs', 'examples') for p in parts)
|
|
133
|
+
source = path.suffix == '.py' and not excluded
|
|
134
|
+
if not (doc or source):
|
|
135
|
+
continue
|
|
136
|
+
text = path.read_text(encoding='utf-8')
|
|
137
|
+
scanned += 1
|
|
138
|
+
if doc:
|
|
139
|
+
p, n = claims(text)
|
|
140
|
+
positive |= p
|
|
141
|
+
negative |= n
|
|
142
|
+
if source and evidence(text):
|
|
143
|
+
test = 'tests' in parts or filename.startswith('test_') or filename.endswith('_test.py')
|
|
144
|
+
testing |= test
|
|
145
|
+
production |= not test
|
|
146
|
+
findings = []
|
|
147
|
+
if positive and not production:
|
|
148
|
+
findings.append(dict(rule='documented-hand-claim-false', severity='MEDIUM' if testing else 'HIGH', message='Documentation promises a capability without production source evidence.'))
|
|
149
|
+
if negative and production:
|
|
150
|
+
findings.append(dict(rule='documented-no-hand-claim-false', severity='HIGH', message='Documentation denies a capability present in production source.'))
|
|
151
|
+
return dict(verdict='FAIL' if findings else 'PASS', findings=findings, files_scanned=scanned)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class Parser(argparse.ArgumentParser):
|
|
155
|
+
def error(self, message):
|
|
156
|
+
self.print_usage(__import__('sys').stderr)
|
|
157
|
+
self.exit(1, self.prog + ': error: ' + message + '\n')
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def main(argv=None):
|
|
161
|
+
parser = Parser(description=__doc__)
|
|
162
|
+
parser.add_argument('root')
|
|
163
|
+
parser.add_argument('--json', action='store_true')
|
|
164
|
+
parser.add_argument('--verbose', action='store_true')
|
|
165
|
+
parser.add_argument('--ignore', action='append', default=[])
|
|
166
|
+
parser.add_argument('--fail-on', choices=('HIGH', 'MEDIUM'), default='HIGH')
|
|
167
|
+
parser.add_argument('--version', action='version', version=__version__)
|
|
168
|
+
args = parser.parse_args(argv)
|
|
169
|
+
try:
|
|
170
|
+
result = audit(args.root, args.ignore)
|
|
171
|
+
except (OSError, ValueError, UnicodeError) as error:
|
|
172
|
+
parser.exit(1, str(error) + '\n')
|
|
173
|
+
failed = any(f['severity'] == 'HIGH' or args.fail_on == 'MEDIUM' for f in result['findings'])
|
|
174
|
+
result['verdict'] = 'FAIL' if failed else 'PASS'
|
|
175
|
+
if args.json:
|
|
176
|
+
print(json.dumps(result))
|
|
177
|
+
else:
|
|
178
|
+
print(result['verdict'])
|
|
179
|
+
for finding in result['findings']:
|
|
180
|
+
print('{severity} {rule}: {message}'.format(**finding))
|
|
181
|
+
if args.verbose:
|
|
182
|
+
print('Files scanned: {}'.format(result['files_scanned']))
|
|
183
|
+
return 2 if failed else 0
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Exact documentation templates, ordered by descending length."""
|
|
2
|
+
|
|
3
|
+
HAND = (
|
|
4
|
+
'supports hand gesture recognition',
|
|
5
|
+
'hand gesture recognition support',
|
|
6
|
+
'support hand gesture recognition',
|
|
7
|
+
'identifies hands in images',
|
|
8
|
+
'recognizes a hand gesture',
|
|
9
|
+
'recognises a hand gesture',
|
|
10
|
+
'identifies a hand gesture',
|
|
11
|
+
'recognizes hand gestures',
|
|
12
|
+
'recognises hand gestures',
|
|
13
|
+
'identifies hand gestures',
|
|
14
|
+
'recognize a hand gesture',
|
|
15
|
+
'recognise a hand gesture',
|
|
16
|
+
'identify hands in images',
|
|
17
|
+
'hand gesture recognition',
|
|
18
|
+
'recognize hand gestures',
|
|
19
|
+
'recognise hand gestures',
|
|
20
|
+
'identify a hand gesture',
|
|
21
|
+
'hand landmark detection',
|
|
22
|
+
'detects hands in images',
|
|
23
|
+
'detects hands in photos',
|
|
24
|
+
'supports hand detection',
|
|
25
|
+
'identify hand gestures',
|
|
26
|
+
'detects a hand gesture',
|
|
27
|
+
'detects hand landmarks',
|
|
28
|
+
'hand landmark tracking',
|
|
29
|
+
'detects hands in video',
|
|
30
|
+
'detect hands in images',
|
|
31
|
+
'detect hands in photos',
|
|
32
|
+
'supports hand tracking',
|
|
33
|
+
'support hand detection',
|
|
34
|
+
'hand detection support',
|
|
35
|
+
'detects hand gestures',
|
|
36
|
+
'detect a hand gesture',
|
|
37
|
+
'tracks hand landmarks',
|
|
38
|
+
'detect hand landmarks',
|
|
39
|
+
'detect hands in video',
|
|
40
|
+
'support hand tracking',
|
|
41
|
+
'hand tracking support',
|
|
42
|
+
'detect hand gestures',
|
|
43
|
+
'track hand landmarks',
|
|
44
|
+
'estimates hand poses',
|
|
45
|
+
'hand pose estimation',
|
|
46
|
+
'tracks hand gestures',
|
|
47
|
+
'estimate hand poses',
|
|
48
|
+
'track hand gestures',
|
|
49
|
+
'detects a hand',
|
|
50
|
+
'hand detection',
|
|
51
|
+
'detects hands',
|
|
52
|
+
'locates hands',
|
|
53
|
+
'tracks a hand',
|
|
54
|
+
'detect a hand',
|
|
55
|
+
'hand tracking',
|
|
56
|
+
'tracks hands',
|
|
57
|
+
'detect hands',
|
|
58
|
+
'locate hands',
|
|
59
|
+
'track a hand',
|
|
60
|
+
'finds a hand',
|
|
61
|
+
'track hands',
|
|
62
|
+
'finds hands',
|
|
63
|
+
'find a hand',
|
|
64
|
+
'find hands',
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
NOHAND = (
|
|
68
|
+
'does not support hand gesture recognition',
|
|
69
|
+
'hand gesture recognition not supported',
|
|
70
|
+
'does not recognize hand gestures',
|
|
71
|
+
'does not recognise hand gestures',
|
|
72
|
+
'does not identify hand gestures',
|
|
73
|
+
'does not support hand detection',
|
|
74
|
+
'does not detect hand landmarks',
|
|
75
|
+
'does not support hand tracking',
|
|
76
|
+
'never recognizes hand gestures',
|
|
77
|
+
'never recognises hand gestures',
|
|
78
|
+
'does not detect hand gestures',
|
|
79
|
+
'does not track hand landmarks',
|
|
80
|
+
'hand detection not supported',
|
|
81
|
+
'hand tracking not supported',
|
|
82
|
+
'no hand gesture recognition',
|
|
83
|
+
'no hand landmark detection',
|
|
84
|
+
'does not detect a hand',
|
|
85
|
+
'without hand detection',
|
|
86
|
+
'does not detect hands',
|
|
87
|
+
'does not track a hand',
|
|
88
|
+
'without hand tracking',
|
|
89
|
+
'does not track hands',
|
|
90
|
+
'does not find hands',
|
|
91
|
+
'never detects hands',
|
|
92
|
+
'never tracks hands',
|
|
93
|
+
'no hand detection',
|
|
94
|
+
'no hand tracking',
|
|
95
|
+
)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hand-claim-audit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Offline audit of documentation against Python vision evidence
|
|
5
|
+
License: MIT
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# hand-claim-audit
|
|
14
|
+
|
|
15
|
+
An offline checker comparing Markdown promises about hand-related vision capabilities with static Python source evidence. Version 0.1.0 requires Python 3.9 or later and has no runtime dependencies.
|
|
16
|
+
|
|
17
|
+
Install and run:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
python3 -m pip install hand-claim-audit
|
|
21
|
+
hand-claim-audit . --json
|
|
22
|
+
python3 -m hand_claim_audit . --verbose
|
|
23
|
+
hand-claim-audit . --ignore 'vendor/*' --fail-on MEDIUM
|
|
24
|
+
hand-claim-audit --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The input is one root directory. Documentation includes its README.md and Markdown files beneath any docs path component. Backtick and tilde fences are excluded; inline code counts. Paragraphs are joined across line breaks, lowercased, and normalized for contractions, hyphens, and whitespace. Exact templates use word boundaries and longer matches take priority. Negative spans are removed before positive matching.
|
|
28
|
+
|
|
29
|
+
For example, these templates are evaluated:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
detects hands
|
|
33
|
+
does not detect hands
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Evidence comes from provider-resolved MediaPipe Hands and cvzone HandDetector construction or calls to process and findHands on corresponding bound objects. Imports and aliases are resolved within each module. Assignment, annotated assignment, context-manager bindings, attributes, and chained construction are supported. Local definitions shadow imported names.
|
|
37
|
+
|
|
38
|
+
Bare imports, image loading, camera capture, supplied landmark drawing, face or pose operations, arbitrary strings, shell commands, and unbound methods do not provide evidence. Source is parsed with ast and never executed. Invalid syntax contributes no evidence. Symlinked files and directories are skipped. Python beneath fixtures, docs, or examples is excluded; files beneath tests or named test_*.py or *_test.py count separately.
|
|
39
|
+
|
|
40
|
+
Rules (at most one finding per family):
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
documented-hand-claim-false: HIGH without production evidence; MEDIUM with test evidence only.
|
|
44
|
+
documented-no-hand-claim-false: HIGH when production evidence contradicts a negative claim.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A project with no matching documentation passes. The default threshold is HIGH; selecting MEDIUM also fails on test-only findings. Exit status is 0 for PASS, 2 for FAIL, and 1 for invalid input, unreadable roots, or usage errors. JSON includes verdict, findings (rule, severity, message), and files_scanned. Human output includes a verdict and findings; verbose mode adds a scanned-file count. Ignore patterns are repeatable fnmatch globs against relative POSIX paths.
|
|
48
|
+
|
|
49
|
+
This is a static heuristic, not proof that a feature works. Construction alone is sufficient. Dynamic imports, cross-module bindings, runtime control flow, and provider behavior are not evaluated. No model execution, network access, or dependency import is needed.
|
|
50
|
+
|
|
51
|
+
Development checks:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
python3 -m unittest discover
|
|
55
|
+
python3 -m build
|
|
56
|
+
python3 -m hand_claim_audit .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The source distribution includes tests and fixtures. Licensed under MIT.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
hand_claim_audit/__init__.py
|
|
6
|
+
hand_claim_audit/__main__.py
|
|
7
|
+
hand_claim_audit/audit.py
|
|
8
|
+
hand_claim_audit/phrases.py
|
|
9
|
+
hand_claim_audit.egg-info/PKG-INFO
|
|
10
|
+
hand_claim_audit.egg-info/SOURCES.txt
|
|
11
|
+
hand_claim_audit.egg-info/dependency_links.txt
|
|
12
|
+
hand_claim_audit.egg-info/entry_points.txt
|
|
13
|
+
hand_claim_audit.egg-info/top_level.txt
|
|
14
|
+
tests/__init__.py
|
|
15
|
+
tests/test_audit.py
|
|
16
|
+
tests/fixtures/bad/README.md
|
|
17
|
+
tests/fixtures/bad/app.py
|
|
18
|
+
tests/fixtures/good/README.md
|
|
19
|
+
tests/fixtures/good/app.py
|
|
20
|
+
tests/fixtures/noclaim/README.md
|
|
21
|
+
tests/fixtures/noclaim/app.py
|
|
22
|
+
tests/fixtures/nohand/README.md
|
|
23
|
+
tests/fixtures/nohand/app.py
|
|
24
|
+
tests/fixtures/testonly/README.md
|
|
25
|
+
tests/fixtures/testonly/tests/test_provider.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hand_claim_audit
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hand-claim-audit"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Offline audit of documentation against Python vision evidence"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
classifiers = ["Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License"]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
hand-claim-audit = "hand_claim_audit.audit:main"
|
|
16
|
+
|
|
17
|
+
[tool.setuptools.packages.find]
|
|
18
|
+
include = ["hand_claim_audit*"]
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Detects hands.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import mediapipe
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Detects hands.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
A simple tool.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import mediapipe
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Does not detect hands.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Detects hands.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import contextlib
|
|
2
|
+
import io
|
|
3
|
+
import json
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import tempfile
|
|
6
|
+
import unittest
|
|
7
|
+
|
|
8
|
+
from hand_claim_audit.audit import audit, claims, evidence, main, _pattern
|
|
9
|
+
from hand_claim_audit.phrases import HAND, NOHAND
|
|
10
|
+
|
|
11
|
+
FIXTURES = Path(__file__).parent / 'fixtures'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ClaimsTests(unittest.TestCase):
|
|
15
|
+
def test_fences(self):
|
|
16
|
+
for marker in ('```', '~~~', ' ````'):
|
|
17
|
+
with self.subTest(marker=marker):
|
|
18
|
+
self.assertEqual(claims(marker + '\ndetects hands\n' + marker), (False, False))
|
|
19
|
+
def test_inline(self):
|
|
20
|
+
self.assertEqual(claims('It `detects hands`.'), (True, False))
|
|
21
|
+
def test_negative_removal(self):
|
|
22
|
+
self.assertEqual(claims('does not detect hands'), (False, True))
|
|
23
|
+
def test_mixed(self):
|
|
24
|
+
self.assertEqual(claims('does not detect hands but tracks hands'), (True, True))
|
|
25
|
+
def test_hyphens(self):
|
|
26
|
+
self.assertEqual(claims('hand-gesture-recognition'), (True, False))
|
|
27
|
+
def test_contractions(self):
|
|
28
|
+
self.assertEqual(claims("doesn't detect hands"), (False, True))
|
|
29
|
+
def test_paragraph_join(self):
|
|
30
|
+
self.assertEqual(claims('detects\nhands'), (True, False))
|
|
31
|
+
self.assertEqual(claims('detects\n\nhands'), (False, False))
|
|
32
|
+
def test_boundaries(self):
|
|
33
|
+
self.assertEqual(claims('redetect handsfree'), (False, False))
|
|
34
|
+
def test_longest_first(self):
|
|
35
|
+
self.assertEqual(_pattern(HAND).search('hand gesture recognition support')[0], 'hand gesture recognition support')
|
|
36
|
+
for values in (HAND, NOHAND):
|
|
37
|
+
self.assertEqual(list(values), sorted(values, key=len, reverse=True))
|
|
38
|
+
self.assertEqual(len(values), len(set(values)))
|
|
39
|
+
def test_readme_prose(self):
|
|
40
|
+
self.assertEqual(claims((Path(__file__).parents[1] / 'README.md').read_text()), (False, False))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
POSITIVE = {
|
|
44
|
+
'direct': 'import mediapipe\nmediapipe.solutions.hands.Hands()',
|
|
45
|
+
'alias': 'import mediapipe as mp\nmp.solutions.hands.Hands()',
|
|
46
|
+
'from': 'from mediapipe.solutions.hands import Hands\nHands()',
|
|
47
|
+
'from_alias': 'from mediapipe.solutions import hands as h\nh.Hands()',
|
|
48
|
+
'with': 'import mediapipe as mp\nwith mp.solutions.hands.Hands() as h:\n h.process(frame)',
|
|
49
|
+
'attribute': 'import mediapipe as mp\nself.h = mp.solutions.hands.Hands()\nself.h.process(frame)',
|
|
50
|
+
'chained': 'import mediapipe as mp\nmp.solutions.hands.Hands().process(frame)',
|
|
51
|
+
'process': 'import mediapipe as mp\nh = mp.solutions.hands.Hands()\nh.process(frame)',
|
|
52
|
+
'annotated': 'import mediapipe as mp\nh: object = mp.solutions.hands.Hands()\nh.process(frame)',
|
|
53
|
+
'cvzone': 'import cvzone\ncvzone.HandTrackingModule.HandDetector()',
|
|
54
|
+
'cvzone_from': 'from cvzone.HandTrackingModule import HandDetector\nHandDetector()',
|
|
55
|
+
'findHands': 'from cvzone.HandTrackingModule import HandDetector as HD\nh = HD()\nh.findHands(frame)',
|
|
56
|
+
'cvzone_with': 'from cvzone.HandTrackingModule import HandDetector\nwith HandDetector() as h:\n h.findHands(frame)',
|
|
57
|
+
'cvzone_attribute': 'from cvzone.HandTrackingModule import HandDetector\nself.h = HandDetector()\nself.h.findHands(frame)',
|
|
58
|
+
'cvzone_annotated': 'from cvzone.HandTrackingModule import HandDetector\nh: object = HandDetector()\nh.findHands(frame)',
|
|
59
|
+
'cvzone_chained': 'from cvzone.HandTrackingModule import HandDetector\nHandDetector().findHands(frame)',
|
|
60
|
+
}
|
|
61
|
+
NEGATIVE = {
|
|
62
|
+
'import': 'import mediapipe\nfrom cvzone.HandTrackingModule import HandDetector',
|
|
63
|
+
'image': 'import cv2\ncv2.imread("hand.png")',
|
|
64
|
+
'pil': 'from PIL import Image\nImage.open("hand.png")',
|
|
65
|
+
'camera': 'import cv2\nc = cv2.VideoCapture(0)\nc.read()',
|
|
66
|
+
'drawing': 'import mediapipe as mp\nmp.solutions.drawing_utils.draw_landmarks(image, landmarks)',
|
|
67
|
+
'face': 'import cv2\ncv2.CascadeClassifier("face.xml").detectMultiScale(image)',
|
|
68
|
+
'pose': 'import mediapipe as mp\nmp.solutions.pose.Pose().process(image)',
|
|
69
|
+
'shadow_class': 'from mediapipe.solutions.hands import Hands\nclass Hands: pass\nHands()',
|
|
70
|
+
'shadow_function': 'from cvzone.HandTrackingModule import HandDetector\ndef HandDetector(): pass\nHandDetector()',
|
|
71
|
+
'shadow_module': 'import mediapipe as mp\nclass mp: pass\nmp.solutions.hands.Hands()',
|
|
72
|
+
'unbound_process': 'unknown.process(frame)',
|
|
73
|
+
'unbound_find': 'unknown.findHands(frame)',
|
|
74
|
+
'string': 'text = "hand detection mp.solutions.hands.Hands()"',
|
|
75
|
+
'subprocess': 'import subprocess\nsubprocess.run(["HandDetector"])',
|
|
76
|
+
'syntax': 'import mediapipe\nmediapipe.solutions.hands.Hands((',
|
|
77
|
+
'other_provider': 'import fake\nfake.solutions.hands.Hands()',
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class EvidenceTests(unittest.TestCase):
|
|
82
|
+
pass
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def evidence_test(source, expected):
|
|
86
|
+
def test(self):
|
|
87
|
+
self.assertEqual(evidence(source), expected)
|
|
88
|
+
return test
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
for name, source in POSITIVE.items():
|
|
92
|
+
setattr(EvidenceTests, 'test_positive_' + name, evidence_test(source, True))
|
|
93
|
+
for name, source in NEGATIVE.items():
|
|
94
|
+
setattr(EvidenceTests, 'test_negative_' + name, evidence_test(source, False))
|
|
95
|
+
for family, phrases in (('hand', HAND), ('nohand', NOHAND)):
|
|
96
|
+
for index, phrase in enumerate(phrases):
|
|
97
|
+
def test(self, phrase=phrase, family=family):
|
|
98
|
+
self.assertEqual(claims(phrase), (family == 'hand', family == 'nohand'))
|
|
99
|
+
setattr(ClaimsTests, 'test_template_{}_{}'.format(family, index), test)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class IntegrationTests(unittest.TestCase):
|
|
103
|
+
def run_cli(self, *args):
|
|
104
|
+
output = io.StringIO()
|
|
105
|
+
with contextlib.redirect_stdout(output):
|
|
106
|
+
code = main(list(map(str, args)))
|
|
107
|
+
return code, output.getvalue()
|
|
108
|
+
def test_good(self):
|
|
109
|
+
self.assertEqual(audit(FIXTURES / 'good')['findings'], [])
|
|
110
|
+
self.assertEqual(self.run_cli(FIXTURES / 'good')[0], 0)
|
|
111
|
+
def test_bad(self):
|
|
112
|
+
code, output = self.run_cli(FIXTURES / 'bad', '--json')
|
|
113
|
+
self.assertEqual(code, 2)
|
|
114
|
+
self.assert_finding(json.loads(output), 'documented-hand-claim-false', 'HIGH')
|
|
115
|
+
def assert_finding(self, result, rule, severity):
|
|
116
|
+
self.assertEqual(len(result['findings']), 1)
|
|
117
|
+
self.assertEqual(result['findings'][0]['rule'], rule)
|
|
118
|
+
self.assertEqual(result['findings'][0]['severity'], severity)
|
|
119
|
+
def test_testonly(self):
|
|
120
|
+
self.assert_finding(audit(FIXTURES / 'testonly'), 'documented-hand-claim-false', 'MEDIUM')
|
|
121
|
+
self.assertEqual(self.run_cli(FIXTURES / 'testonly')[0], 0)
|
|
122
|
+
self.assertEqual(self.run_cli(FIXTURES / 'testonly', '--fail-on', 'MEDIUM')[0], 2)
|
|
123
|
+
def test_nohand(self):
|
|
124
|
+
code, output = self.run_cli(FIXTURES / 'nohand', '--json')
|
|
125
|
+
self.assertEqual(code, 2)
|
|
126
|
+
self.assert_finding(json.loads(output), 'documented-no-hand-claim-false', 'HIGH')
|
|
127
|
+
def test_noclaim(self):
|
|
128
|
+
self.assertEqual(audit(FIXTURES / 'noclaim')['verdict'], 'PASS')
|
|
129
|
+
def test_ignore(self):
|
|
130
|
+
self.assertEqual(self.run_cli(FIXTURES / 'bad', '--ignore', 'README.md')[0], 0)
|
|
131
|
+
self.assertEqual(self.run_cli(FIXTURES / 'good', '--ignore', '*.py')[0], 2)
|
|
132
|
+
def test_json(self):
|
|
133
|
+
_, output = self.run_cli(FIXTURES / 'good', '--json')
|
|
134
|
+
self.assertEqual(set(json.loads(output)), {'verdict', 'findings', 'files_scanned'})
|
|
135
|
+
def test_verbose(self):
|
|
136
|
+
self.assertIn('Files scanned: 2', self.run_cli(FIXTURES / 'good', '--verbose')[1])
|
|
137
|
+
def test_version(self):
|
|
138
|
+
out = io.StringIO()
|
|
139
|
+
with contextlib.redirect_stdout(out), self.assertRaises(SystemExit) as caught:
|
|
140
|
+
main(['--version'])
|
|
141
|
+
self.assertEqual(caught.exception.code, 0)
|
|
142
|
+
self.assertEqual(out.getvalue().strip(), '0.1.0')
|
|
143
|
+
def test_invalid_root(self):
|
|
144
|
+
with contextlib.redirect_stderr(io.StringIO()), self.assertRaises(SystemExit) as caught:
|
|
145
|
+
main(['/nonexistent-hand-audit-root'])
|
|
146
|
+
self.assertEqual(caught.exception.code, 1)
|
|
147
|
+
def test_usage(self):
|
|
148
|
+
for args in ([], ['--unknown'], ['.', '--fail-on', 'LOW']):
|
|
149
|
+
with contextlib.redirect_stderr(io.StringIO()), self.assertRaises(SystemExit) as caught:
|
|
150
|
+
main(args)
|
|
151
|
+
self.assertEqual(caught.exception.code, 1)
|
|
152
|
+
def test_exclusions_and_test_names(self):
|
|
153
|
+
for location in ('fixtures/a.py', 'docs/a.py', 'examples/a.py', 'tests/a.py', 'test_a.py', 'a_test.py'):
|
|
154
|
+
with self.subTest(location=location), tempfile.TemporaryDirectory() as temp:
|
|
155
|
+
root = Path(temp)
|
|
156
|
+
(root / 'README.md').write_text('detects hands')
|
|
157
|
+
source = root / location
|
|
158
|
+
source.parent.mkdir(parents=True, exist_ok=True)
|
|
159
|
+
source.write_text(POSITIVE['direct'])
|
|
160
|
+
result = audit(root)
|
|
161
|
+
self.assert_finding(result, 'documented-hand-claim-false', 'HIGH' if location.split('/')[0] in ('fixtures', 'docs', 'examples') else 'MEDIUM')
|
|
162
|
+
def test_docs_and_symlinks(self):
|
|
163
|
+
with tempfile.TemporaryDirectory() as temp:
|
|
164
|
+
root = Path(temp)
|
|
165
|
+
(root / 'nested/docs').mkdir(parents=True)
|
|
166
|
+
(root / 'nested/docs/guide.md').write_text('detects hands')
|
|
167
|
+
(root / 'target').mkdir()
|
|
168
|
+
(root / 'target/a.txt').write_text(POSITIVE['direct'])
|
|
169
|
+
(root / 'link.py').symlink_to(root / 'target/a.txt')
|
|
170
|
+
(root / 'linked').symlink_to(FIXTURES / 'good', target_is_directory=True)
|
|
171
|
+
self.assert_finding(audit(root), 'documented-hand-claim-false', 'HIGH')
|
|
172
|
+
def test_one_per_family(self):
|
|
173
|
+
with tempfile.TemporaryDirectory() as temp:
|
|
174
|
+
root = Path(temp)
|
|
175
|
+
(root / 'README.md').write_text('detects hands\n\ntracks hands\n\nfinds hands')
|
|
176
|
+
self.assertEqual(len(audit(root)['findings']), 1)
|
|
177
|
+
def test_self_audit(self):
|
|
178
|
+
self.assertEqual(audit(Path(__file__).parents[1])['findings'], [])
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
if __name__ == '__main__':
|
|
182
|
+
unittest.main()
|