문제: 예측·실측 장부 줄은 쌓이는데 회고한 줄이 0이다. 회고는 사람이 「주 1회」를 기억해야 돌고, 고친 뒤 효과가 없으면 되돌린다는 규칙을 적을 칸도 없다. 지난 4작업은 모두 실측이 p30 아래였는데(실측/p50 시간 중앙값 0.43), 매번 이유 한 줄만 바꿔서 치우침이 그대로 남았다. 고른 방법: - precedents 끝에 보정 줄을 낸다: 실측/p50 중앙값(시간·호출·출력)과 p30 아래·p80 위 건수. --ledger를 여러 번 받아 다른 repo 장부를 더한다. estimate 스킬에 「중앙값이 0.8 아래나 1.25 위면 세 값에 곱한다」 한 줄. - pending은 예측 밖(p30~p80 밖이거나 why가 있음)인데 retro 줄이 없는 작업만 보이고, 효과 판정이 없는 개선도 보인다. - retro 줄에 fix(개선 id)·applied_at, 새 줄 verdict(effective·reverted). 판정은 개선 뒤에 예측 줄을 쓴 다른 작업 2건의 실측이 끝나면 한다. 개선 전에 예측한 작업은 그 개선의 영향을 받지 않아 세지 않는다. - SessionStart에 ledger.py nudge를 따로 건다. startup일 때만, 같은 repo(worktree를 git common dir로 묶어)에 20시간에 한 번 한 줄. append가 actual 줄을 쓸 때 예측 밖이면 그 자리에서 한 줄 알린다. 버린 대안: session-start 장부 훅에서 출력(장부 훅 출력 0 규칙을 깬다), 매 세션 넛지(하위 세션마다 같은 줄이 컨텍스트에 쌓인다), 별도 retro 스크립트(이미 있는 ledger.py 명령으로 충분하다). 위험: 넛지는 그 repo의 첫 세션이 하위 세션이어도 나온다. 문구에 「맡은 일이 회고가 아니면 넘긴다」를 넣었다. 다른 repo 장부에 retro 줄이 더해질 때까지 그 repo에서는 하루 한 번 넛지가 나온다. 보정 규칙은 같은 4건으로 잰 값이라 아직 효과를 모른다. 검증: scripts/check.sh rc=0(플러그인 시험 21개 OK, expected failure 1, 템플릿 시험 10개 OK, plugin validate --strict 통과). 새 조건 15개를 하나씩 끈 사본에서 LedgerTest가 15번 모두 실패했다. 백엔드 템플릿 장부에 nudge를 돌리면 「회고 안 한 빗나간 예측 3건」 한 줄이 나왔다 (상태 폴더는 scratchpad).
317 lines
18 KiB
Python
317 lines
18 KiB
Python
"""하네스 플러그인 훅과 장부 도구 시험. 표준 라이브러리만 쓴다.
|
|
|
|
python3 -m unittest discover -s plugins/harness/tests
|
|
|
|
훅 스크립트에 Claude Code가 주는 것과 같은 JSON을 stdin으로 넣고 종료 코드와 출력을 본다.
|
|
"""
|
|
import json
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
import unittest
|
|
|
|
SCRIPTS = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scripts")
|
|
REPO = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPTS)))
|
|
_COMMON = subprocess.run(["git", "-C", REPO, "rev-parse", "--path-format=absolute", "--git-common-dir"],
|
|
capture_output=True, text=True).stdout.strip()
|
|
# main checkout 안에 만든 worktree(.claude/worktrees/…)에서 도는가. 이때 H12 허용 폴더에 main checkout이 들어가
|
|
# worktree 자신(`rm -rf ./*`)이나 옆 worktree(`../x`)를 지우는 것이 통과한다(알려진 빈틈, 전역 훅과 같이 고친다)
|
|
NESTED_WORKTREE = bool(_COMMON) and os.path.realpath(REPO).startswith(os.path.dirname(os.path.realpath(_COMMON)) + "/")
|
|
|
|
|
|
def run(script, args=(), payload=None, env=None, cwd=None):
|
|
full_env = {k: v for k, v in os.environ.items() if k != "CLAUDE_PROJECT_DIR"}
|
|
full_env.update(env or {})
|
|
stdin = payload if isinstance(payload, str) else json.dumps(payload or {})
|
|
return subprocess.run([sys.executable, "-I", os.path.join(SCRIPTS, script), *args], input=stdin,
|
|
capture_output=True, text=True, env=full_env, cwd=cwd, timeout=30)
|
|
|
|
|
|
def bash(command, cwd=REPO):
|
|
return {"session_id": "t", "hook_event_name": "PreToolUse", "tool_name": "Bash",
|
|
"tool_input": {"command": command}, "cwd": cwd}
|
|
|
|
|
|
class GuardBashTest(unittest.TestCase):
|
|
"""H12. 여기 사례는 판정의 대표만 둔다. 많은 사례는 소유자 기계 전역 훅 시험에 있다."""
|
|
|
|
ALWAYS = {"HARNESS_H12": "always"}
|
|
|
|
def assert_blocked(self, command, cwd=REPO):
|
|
r = run("guard_bash.py", payload=bash(command, cwd), env=self.ALWAYS)
|
|
self.assertEqual(r.returncode, 2, "막혀야 한다: %s\n%s" % (command, r.stderr))
|
|
self.assertIn("[H12", r.stderr)
|
|
|
|
def assert_passed(self, command, cwd=REPO):
|
|
r = run("guard_bash.py", payload=bash(command, cwd), env=self.ALWAYS)
|
|
self.assertEqual(r.returncode, 0, "통과해야 한다: %s\n%s" % (command, r.stderr))
|
|
|
|
def test_force_push_to_hosting_remote_is_blocked(self):
|
|
for c in ("git push --force origin main", "git push -f", "git push origin +feature/x",
|
|
"git push --force-with-lease origin claude/x", "git push --mirror origin",
|
|
"ssh build 'cd ~/w/x && git push -f origin main'"):
|
|
self.assert_blocked(c)
|
|
|
|
def test_path_remote_transport_passes_but_not_onto_main(self):
|
|
self.assert_passed("git push -q -f desktop:/home/u/w/x v3/check:refs/heads/v3/check")
|
|
self.assert_blocked("git push -f desktop:/home/u/w/x HEAD:main")
|
|
|
|
def test_normal_push_and_own_branch_delete_pass(self):
|
|
self.assert_passed("git push -u origin claude/x")
|
|
self.assert_passed("git push origin --delete review/x")
|
|
self.assert_blocked("git push origin --delete main")
|
|
|
|
def test_rm_outside_or_too_broad_is_blocked(self):
|
|
for c in ("rm -rf /", "rm -rf ~", "rm -rf .git", 'rm -rf "$UNSET/"',
|
|
"ssh build 'rm -rf ~/workspace/some-repo'"):
|
|
self.assert_blocked(c)
|
|
|
|
@(unittest.expectedFailure if NESTED_WORKTREE else (lambda f: f))
|
|
def test_rm_whole_checkout_or_sibling_is_blocked(self):
|
|
for c in ("rm -rf ./*", "rm -rf ../other-repo/src"):
|
|
self.assert_blocked(c)
|
|
|
|
def test_rm_inside_project_tmp_and_known_vars_pass(self):
|
|
for c in ("rm -rf build dist", "rm -rf /tmp/some-build-x", 'T=$(mktemp -d) && rm -rf "$T"',
|
|
"S=/tmp/x; rm -rf $S/out", 'rm -rf "${OUT:?}/build"', "ssh build 'rm -rf ~/x-logs'"):
|
|
self.assert_passed(c)
|
|
|
|
def test_data_deletion_is_blocked(self):
|
|
for c in ("psql -c 'DROP DATABASE app'", "redis-cli FLUSHALL", "./gradlew :app:flywayClean",
|
|
"ssh build 'docker compose down -v'", "docker volume rm app_db",
|
|
"kubectl delete pvc data-0"):
|
|
self.assert_blocked(c)
|
|
|
|
def test_scoped_teardown_and_data_as_text_pass(self):
|
|
for c in ("docker compose -p lane-1 -f compose.yml down -v", "docker compose down",
|
|
"kubectl delete pod web-1", "grep -rn 'DROP TABLE' docs",
|
|
"cat > V2__drop.sql <<'EOF'\nDROP TABLE old;\nEOF"):
|
|
self.assert_passed(c)
|
|
|
|
def test_skips_when_owner_global_hook_has_h12(self):
|
|
with tempfile.TemporaryDirectory() as home:
|
|
os.makedirs(os.path.join(home, ".claude"))
|
|
settings = {"hooks": {"PreToolUse": [{"matcher": "Bash", "hooks": [
|
|
{"type": "command", "command": "python3 -I /x/.claude/hooks/guard_bash.py H12"}]}]}}
|
|
with open(os.path.join(home, ".claude", "settings.json"), "w") as f:
|
|
json.dump(settings, f)
|
|
r = run("guard_bash.py", payload=bash("git push --force origin main"), env={"HOME": home})
|
|
self.assertEqual(r.returncode, 0, r.stderr)
|
|
settings["hooks"]["PreToolUse"][0]["hooks"][0]["command"] = "python3 -I /x/guard_bash.py H1"
|
|
with open(os.path.join(home, ".claude", "settings.json"), "w") as f:
|
|
json.dump(settings, f)
|
|
r = run("guard_bash.py", payload=bash("git push --force origin main"), env={"HOME": home})
|
|
self.assertEqual(r.returncode, 2, r.stderr)
|
|
|
|
def test_broken_input_does_not_block(self):
|
|
r = run("guard_bash.py", payload="{not json", env=self.ALWAYS)
|
|
self.assertEqual(r.returncode, 1)
|
|
|
|
|
|
class NudgeSecretsTest(unittest.TestCase):
|
|
def nudge(self, content, tool="Write"):
|
|
key = "content" if tool == "Write" else "new_string"
|
|
r = run("nudge_secrets.py", payload={"tool_name": tool, "tool_input": {"file_path": "a.yml", key: content}})
|
|
self.assertEqual(r.returncode, 0, r.stderr)
|
|
return json.loads(r.stdout)["hookSpecificOutput"]["additionalContext"] if r.stdout.strip() else ""
|
|
|
|
def test_real_looking_secrets_nudge_and_are_masked(self):
|
|
token = "ghp_" + "a1B2" * 9
|
|
for content in ("-----BEGIN OPENSSH PRIVATE KEY-----", "token: " + token,
|
|
'db:\n password: "s3cr3t-Value"', "AWS_KEY=AKIA" + "ABCDEFGHIJKLMNOP"):
|
|
text = self.nudge(content)
|
|
self.assertIn("[N4", text, content)
|
|
self.assertNotIn(token, text)
|
|
|
|
def test_edit_new_string_is_checked(self):
|
|
self.assertIn("[N4", self.nudge("api_key = 'q8Zr2LmP0xY'", tool="Edit"))
|
|
|
|
def test_placeholders_and_references_are_quiet(self):
|
|
for content in ("password: ${DB_PASSWORD}", "password=changeme", "api_key: <your-key>",
|
|
"AWS_KEY=AKIAIOSFODNN7EXAMPLE", "max_tokens: 4096", "TOKEN_TTL=3600",
|
|
"password = request.getParameter(\"pw\")", "secret: dummy-secret-value"):
|
|
self.assertEqual(self.nudge(content), "", content)
|
|
|
|
|
|
class LedgerTest(unittest.TestCase):
|
|
def setUp(self):
|
|
self.tmp = tempfile.TemporaryDirectory()
|
|
self.dir = self.tmp.name
|
|
self.env = {"HARNESS_STATE_DIR": os.path.join(self.dir, "state")}
|
|
self.transcript = os.path.join(self.dir, "abc.jsonl")
|
|
|
|
def tearDown(self):
|
|
self.tmp.cleanup()
|
|
|
|
def write_transcript(self, lines, mode="w"):
|
|
with open(self.transcript, mode) as f:
|
|
for line in lines:
|
|
f.write(json.dumps(line) + "\n")
|
|
|
|
@staticmethod
|
|
def assistant(msg_id, ts, out, cache_read=100, inp=10, created=5):
|
|
return {"type": "assistant", "timestamp": ts, "message": {"id": msg_id, "usage": {
|
|
"input_tokens": inp, "cache_creation_input_tokens": created, "cache_read_input_tokens": cache_read,
|
|
"output_tokens": out}}}
|
|
|
|
def test_usage_dedupes_message_ids_and_caps_gaps(self):
|
|
self.write_transcript([
|
|
{"type": "user", "timestamp": "2026-11-07T10:00:00Z"},
|
|
self.assistant("m1", "2026-11-07T10:01:00Z", 50),
|
|
self.assistant("m1", "2026-11-07T10:01:01Z", 70), # 같은 메시지가 나뉘어 기록됨: 한 번, 큰 값
|
|
self.assistant("m2", "2026-11-07T10:31:01Z", 30, cache_read=400), # 30분 빈틈은 5분만
|
|
])
|
|
sub = os.path.join(self.dir, "abc", "subagents")
|
|
os.makedirs(sub)
|
|
with open(os.path.join(sub, "agent-1.jsonl"), "w") as f:
|
|
f.write(json.dumps(self.assistant("s1", "2026-11-07T10:02:00Z", 20)) + "\n")
|
|
r = run("ledger.py", ["usage", self.transcript], env=self.env)
|
|
self.assertEqual(r.returncode, 0, r.stderr)
|
|
u = json.loads(r.stdout)
|
|
self.assertEqual((u["calls"], u["subagent_calls"], u["output_tokens"]), (3, 1, 120))
|
|
self.assertEqual(u["cache_read_tokens"], 600)
|
|
self.assertEqual(u["max_context"], 415)
|
|
self.assertEqual((u["minutes"], u["active_minutes"]), (31, 6))
|
|
|
|
def test_stop_hook_reads_incrementally_and_matches_full_scan(self):
|
|
self.write_transcript([self.assistant("m1", "2026-11-07T10:00:00Z", 10)])
|
|
hook = {"session_id": "s-1", "transcript_path": self.transcript, "cwd": self.dir}
|
|
self.assertEqual(run("ledger.py", ["stop"], payload=hook, env=self.env).returncode, 0)
|
|
self.write_transcript([self.assistant("m2", "2026-11-07T10:02:00Z", 5)], mode="a")
|
|
with open(self.transcript, "a") as f:
|
|
f.write('{"type": "assistant", "timestamp": "2026-11-07T10:0') # 쓰는 중인 줄은 다음에
|
|
self.assertEqual(run("ledger.py", ["stop"], payload=hook, env=self.env).returncode, 0)
|
|
with open(os.path.join(self.env["HARNESS_STATE_DIR"], "usage", "s-1.json")) as f:
|
|
saved = json.load(f)["summary"]
|
|
self.assertEqual((saved["calls"], saved["output_tokens"], saved["active_minutes"]), (2, 15, 2))
|
|
|
|
def test_session_start_records_and_hooks_never_print(self):
|
|
hook = {"session_id": "s-2", "transcript_path": self.transcript, "cwd": self.dir, "source": "startup"}
|
|
r = run("ledger.py", ["session-start"], payload=hook, env=self.env)
|
|
self.assertEqual((r.returncode, r.stdout), (0, ""))
|
|
with open(os.path.join(self.env["HARNESS_STATE_DIR"], "sessions.jsonl")) as f:
|
|
self.assertEqual(json.loads(f.readline())["session_id"], "s-2")
|
|
r = run("ledger.py", ["stop"], payload="{broken", env=self.env)
|
|
self.assertEqual((r.returncode, r.stdout), (0, ""))
|
|
|
|
def test_append_checks_fields_and_actual_computes_within(self):
|
|
ledger = os.path.join(self.dir, "docs", "ledger", "estimates.jsonl")
|
|
bad = {"kind": "estimate", "task": "t1", "minutes": {"p30": 1}}
|
|
r = run("ledger.py", ["append", "--ledger", ledger], payload=bad, env=self.env)
|
|
self.assertEqual(r.returncode, 1)
|
|
self.assertFalse(os.path.exists(ledger))
|
|
good = {"kind": "estimate", "task": "t1", "task_kind": "docs", "size": "small",
|
|
"minutes": {"p30": 1, "p50": 2, "p80": 10}, "basis": "시험"}
|
|
self.assertEqual(run("ledger.py", ["append", "--ledger", ledger], payload=good, env=self.env).returncode, 0)
|
|
self.write_transcript([self.assistant("m1", "2026-11-07T10:00:00Z", 10),
|
|
self.assistant("m2", "2026-11-07T10:03:00Z", 10)])
|
|
r = run("ledger.py", ["actual", "--task", "t1", "--ledger", ledger, self.transcript], env=self.env)
|
|
row = json.loads(r.stdout)
|
|
self.assertEqual((row["active_minutes"], row["within"]), (3, "p80"))
|
|
r = run("ledger.py", ["precedents", "--ledger", ledger], env=self.env)
|
|
self.assertIn("| t1 | docs | small | 1/2/10 |", r.stdout)
|
|
retro = {"kind": "retro", "task": "t1", "cause": "모름", "level": "gate"}
|
|
self.assertEqual(run("ledger.py", ["append", "--ledger", ledger], payload=retro, env=self.env).returncode, 1)
|
|
|
|
def write_ledger(self, path, rows):
|
|
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
with open(path, "a", encoding="utf-8") as f:
|
|
for row in rows:
|
|
f.write(json.dumps(row, ensure_ascii=False) + "\n")
|
|
|
|
@staticmethod
|
|
def pair(task, active, why="", at="2026-11-01T10:00+09:00", p=(10, 20, 30), calls=None):
|
|
est = {"kind": "estimate", "task": task, "minutes": dict(zip(("p30", "p50", "p80"), p)), "basis": "시험",
|
|
"recorded_at": at}
|
|
act = {"kind": "actual", "task": task, "active_minutes": active, "why": why, "recorded_at": at}
|
|
if calls:
|
|
est["calls"], act["calls"] = {"p30": 1, "p50": calls[0], "p80": 99}, calls[1]
|
|
return [est, act]
|
|
|
|
def test_pending_lists_misses_then_tracks_fix_until_verdict(self):
|
|
ledger = os.path.join(self.dir, "estimates.jsonl")
|
|
self.write_ledger(ledger, self.pair("in", 25) + self.pair("under", 3) + self.pair("over", 31)
|
|
+ self.pair("noted", 15, why="검증 대기가 길었다"))
|
|
r = run("ledger.py", ["pending", "--ledger", ledger], env=self.env)
|
|
self.assertEqual([line.split(":")[0] for line in r.stdout.splitlines()], ["- under", "- over", "- noted"])
|
|
|
|
retro = {"kind": "retro", "task": "under", "cause": "예측 근거 없음", "level": "architecture", "note": "시험",
|
|
"fix": "f1", "recorded_at": "2026-11-02T10:00+09:00"}
|
|
self.assertEqual(run("ledger.py", ["append", "--ledger", ledger], payload=retro, env=self.env).returncode, 0)
|
|
self.write_ledger(ledger, [{"kind": "estimate", "task": "under", "correction": True,
|
|
"recorded_at": "2026-11-02T12:00+09:00"}, # 회고한 작업 자신은 세지 않는다
|
|
{"kind": "estimate", "task": "c", "minutes": {"p30": 1, "p50": 2, "p80": 9},
|
|
"basis": "시험", "recorded_at": "2026-11-02T12:00+09:00"}]) # 실측 전은 세지 않는다
|
|
r = run("ledger.py", ["pending", "--ledger", ledger], env=self.env)
|
|
self.assertNotIn("- under", r.stdout)
|
|
self.assertIn("- 판정 대기 f1(under, 2026-11-02 적용): 뒤 실측 0건\n", r.stdout)
|
|
|
|
for task, at in (("a", "2026-11-03T10:00+09:00"), ("b", "2026-11-04T10:00+09:00")):
|
|
self.write_ledger(ledger, [{"kind": "estimate", "task": task, "minutes": {"p30": 1, "p50": 2, "p80": 9},
|
|
"basis": "시험", "recorded_at": at}])
|
|
r = run("ledger.py", ["append", "--ledger", ledger], env=self.env,
|
|
payload={"kind": "actual", "task": task, "active_minutes": 40, "recorded_at": at})
|
|
self.assertIn("예측 밖이다(예측 1/2/9분, 실측 40분)", r.stdout)
|
|
self.assertIn("효과를 판정할 개선 1건", r.stdout)
|
|
self.assertIn("뒤 실측 2건. 판정할 때다", run("ledger.py", ["pending", "--ledger", ledger], env=self.env).stdout)
|
|
|
|
for bad in ({"fix": "f9", "effect": "effective"}, {"fix": "f1", "effect": "모름"}):
|
|
r = run("ledger.py", ["append", "--ledger", ledger], env=self.env, payload={"kind": "verdict", "task": "b", **bad})
|
|
self.assertEqual(r.returncode, 1, bad)
|
|
verdict = {"kind": "verdict", "task": "b", "fix": "f1", "effect": "reverted", "ref": "abc1234"}
|
|
self.assertEqual(run("ledger.py", ["append", "--ledger", ledger], payload=verdict, env=self.env).returncode, 0)
|
|
self.assertNotIn("판정 대기", run("ledger.py", ["pending", "--ledger", ledger], env=self.env).stdout)
|
|
|
|
def test_precedents_shows_bias_across_ledgers(self):
|
|
one, two = os.path.join(self.dir, "one.jsonl"), os.path.join(self.dir, "two.jsonl")
|
|
self.write_ledger(one, self.pair("x", 5, calls=(100, 40)))
|
|
self.write_ledger(two, self.pair("y", 15, calls=(100, 60)) + self.pair("z", 40))
|
|
r = run("ledger.py", ["precedents", "--ledger", one, "--ledger", two], env=self.env)
|
|
self.assertIn("실측/p50 중앙값 시간 0.75(3건) · 호출 0.50(2건). 시간 실측이 p30 아래 1건, p80 위 1건", r.stdout)
|
|
|
|
def test_nudge_prints_one_line_once_per_repo_on_startup(self):
|
|
repo = os.path.join(self.dir, "repo")
|
|
os.makedirs(repo)
|
|
subprocess.run(["git", "init", "-q", repo], check=True)
|
|
hook = {"session_id": "s", "cwd": repo, "source": "startup"}
|
|
self.assertEqual(run("ledger.py", ["nudge"], payload=hook, env=self.env).stdout, "") # 장부 없음
|
|
ledger = os.path.join(repo, "docs", "ledger", "estimates.jsonl")
|
|
self.write_ledger(ledger, self.pair("in", 25))
|
|
self.assertEqual(run("ledger.py", ["nudge"], payload=hook, env=self.env).stdout, "") # 빗나간 것 없음
|
|
self.write_ledger(ledger, self.pair("under", 3))
|
|
self.assertEqual(run("ledger.py", ["nudge"], payload={**hook, "source": "resume"}, env=self.env).stdout, "")
|
|
r = run("ledger.py", ["nudge"], payload=hook, env=self.env)
|
|
self.assertEqual(r.returncode, 0)
|
|
self.assertEqual(len(r.stdout.splitlines()), 1)
|
|
self.assertIn("회고 안 한 빗나간 예측 1건", r.stdout)
|
|
self.assertEqual(run("ledger.py", ["nudge"], payload=hook, env=self.env).stdout, "") # 하루 한 번
|
|
r = run("ledger.py", ["nudge"], payload="{broken", env=self.env)
|
|
self.assertEqual((r.returncode, r.stdout), (0, ""))
|
|
|
|
|
|
class TechdebtTest(unittest.TestCase):
|
|
def test_lists_only_added_markers(self):
|
|
with tempfile.TemporaryDirectory() as d:
|
|
def git(*a):
|
|
subprocess.run(["git", "-C", d, *a], check=True, capture_output=True)
|
|
git("init", "-q", "-b", "main")
|
|
git("config", "user.email", "t@example.com")
|
|
git("config", "user.name", "t")
|
|
git("config", "core.hooksPath", "/dev/null")
|
|
with open(os.path.join(d, "a.py"), "w") as f:
|
|
f.write("# TODO old\n")
|
|
git("add", ".")
|
|
git("commit", "-q", "-m", "base")
|
|
with open(os.path.join(d, "a.py"), "a") as f:
|
|
f.write("x = 1 # noqa\n# FIXME new\n")
|
|
r = run("techdebt.py", ["--base", "HEAD"], cwd=d)
|
|
self.assertEqual(r.returncode, 0, r.stderr)
|
|
self.assertIn("a.py:3 # FIXME new", r.stdout)
|
|
self.assertIn("a.py:2 x = 1 # noqa", r.stdout)
|
|
self.assertNotIn("TODO old", r.stdout)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|