COMPONENT_STARTUP, COMPONENT_TABLE and COMPONENT_KERNEL record schemas (schema_component.json), validate_component.py (record / --negative-suite / merge), one sample per level (two for start-up: ours and vanilla), a negative-case table and 41 unittest tests. Shares the STRA-246 evaluator and definitions; stdlib only, Python >= 3.9. Classes are computed elsewhere (STRA-313); the validator checks presence and consistency. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
409 lines
20 KiB
Python
409 lines
20 KiB
Python
"""Tests of the COMPONENT evidence validator (STRA-287). Run: python -m unittest discover -s scripts/e2e/evidence -p "test_validate_component.py" -v
|
|
Stdlib only, Python >= 3.9."""
|
|
import ast
|
|
import copy
|
|
import json
|
|
import math
|
|
import os
|
|
import re
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
import unittest
|
|
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
REPO = os.path.abspath(os.path.join(HERE, "..", "..", ".."))
|
|
sys.path.insert(0, HERE)
|
|
import validate as E2E # noqa: E402
|
|
import validate_component as C # noqa: E402
|
|
|
|
VALIDATE_COMPONENT = os.path.join(HERE, "validate_component.py")
|
|
SAMPLES = {
|
|
"sample_component_startup_ours.json": "COMPONENT_STARTUP",
|
|
"sample_component_startup_vanilla.json": "COMPONENT_STARTUP",
|
|
"sample_component_table.json": "COMPONENT_TABLE",
|
|
"sample_component_kernel.json": "COMPONENT_KERNEL",
|
|
}
|
|
|
|
|
|
def load(name):
|
|
return C.load_json(os.path.join(HERE, name))
|
|
|
|
|
|
def run_cli(*args):
|
|
proc = subprocess.run([sys.executable, VALIDATE_COMPONENT] + list(args), stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
|
universal_newlines=True, cwd=REPO)
|
|
return proc.returncode, proc.stdout, proc.stderr
|
|
|
|
|
|
def codes(rec):
|
|
return [c for c, _, _ in C.validate_record(rec, C.load_schema())]
|
|
|
|
|
|
def table_row(name):
|
|
rec = load("sample_component_table.json")
|
|
return rec, [r for r in rec["rows"] if r["component"] == name][0]
|
|
|
|
|
|
class SamplesAndCli(unittest.TestCase):
|
|
def test_four_samples_valid_via_cli_without_edit(self):
|
|
for name, level in SAMPLES.items():
|
|
code, out, err = run_cli(os.path.join("scripts", "e2e", "evidence", name))
|
|
self.assertEqual((code, out.strip(), err), (0, "OK " + level, ""), name)
|
|
|
|
def test_ours_sample_has_prefixed_lines_and_vanilla_has_family_block_only(self):
|
|
ours = load("sample_component_startup_ours.json")
|
|
self.assertTrue(all(re.match(r"^leleka-serve (cpu|gpu): ", line) for line in ours["kernel_lines"]))
|
|
self.assertTrue(any(line.startswith("leleka-serve cpu: ") for line in ours["kernel_lines"]))
|
|
vanilla = load("sample_component_startup_vanilla.json")
|
|
self.assertNotIn("kernel_lines", vanilla)
|
|
self.assertEqual(vanilla["vanilla_cpu_family"]["printed"], "none printed")
|
|
self.assertEqual(vanilla["vanilla_cpu_family"]["control"]["env"], "STRATA_FORCE_AVX2=1")
|
|
|
|
def test_startup_has_no_context_length_requirement(self):
|
|
schema = C.load_schema()
|
|
self.assertFalse([k for k in schema["levels"]["COMPONENT_STARTUP"]["required"] if "context" in k])
|
|
self.assertEqual(codes(load("sample_component_startup_ours.json")), [])
|
|
|
|
def test_negative_suite_all_rejected(self):
|
|
code, out, _ = run_cli("--negative-suite")
|
|
match = re.search(r"^rejected: (\d+)/(\d+)$", out, re.M)
|
|
self.assertEqual(code, 0, out)
|
|
self.assertIsNotNone(match)
|
|
self.assertEqual(match.group(1), match.group(2))
|
|
self.assertGreaterEqual(int(match.group(2)), 8)
|
|
|
|
def test_negative_suite_covers_the_eight_required_rejections(self):
|
|
wanted = {
|
|
"table_row_without_class_n30", "table_equal_ci_high_outside_interval", "table_equal_without_aa",
|
|
"kernel_without_toolchain", "kernel_without_equality_verdict", "kernel_without_kab1_manifest_sha256",
|
|
"kernel_tolerance_without_basis", "startup_without_build_identity", "startup_ours_bare_cpu_prefix",
|
|
"startup_vanilla_claims_cpu_lines",
|
|
}
|
|
ids = set(case["id"] for case in load("negative_component_cases.json")["cases"])
|
|
self.assertEqual(wanted - ids, set())
|
|
|
|
def test_negative_suite_fails_when_a_case_is_accepted(self):
|
|
with tempfile.TemporaryDirectory() as tmp:
|
|
for name in list(SAMPLES) + ["sample_ours.json"]:
|
|
with open(os.path.join(tmp, name), "w", encoding="utf-8") as handle:
|
|
json.dump(load(name), handle)
|
|
index = load("negative_component_cases.json")
|
|
index["cases"] = index["cases"] + [{"id": "harmless_edit", "base": "sample_component_table.json", "ops": [], "expect": "RULE_CLASS_REQUIRED"}]
|
|
with open(os.path.join(tmp, "negative_component_cases.json"), "w", encoding="utf-8") as handle:
|
|
json.dump(index, handle)
|
|
code, out, _ = run_cli("--negative-suite", "--dir", tmp)
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("harmless_edit: ACCEPTED", out)
|
|
|
|
def test_usage_error_exit_code(self):
|
|
code, _, err = run_cli()
|
|
self.assertEqual(code, 2)
|
|
self.assertIn("usage:", err)
|
|
|
|
def test_rejected_record_exits_1_with_reason(self):
|
|
rec = load("sample_component_table.json")
|
|
del rec["rows"][0]["class"]
|
|
with tempfile.TemporaryDirectory() as tmp:
|
|
path = os.path.join(tmp, "bad.json")
|
|
with open(path, "w", encoding="utf-8") as handle:
|
|
json.dump(rec, handle)
|
|
code, out, _ = run_cli(path)
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("REJECTED RULE_CLASS_REQUIRED /rows/0/class", out)
|
|
|
|
|
|
class Merge(unittest.TestCase):
|
|
def test_component_with_end_to_end_refused(self):
|
|
code, out, _ = run_cli("merge", os.path.join(HERE, "sample_component_table.json"), os.path.join(HERE, "sample_ours.json"))
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("COMPONENT with END_TO_END refused", out)
|
|
|
|
def test_end_to_end_first_also_refused(self):
|
|
code, out, _ = run_cli("merge", os.path.join(HERE, "sample_ours.json"), os.path.join(HERE, "sample_component_kernel.json"))
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("COMPONENT with END_TO_END refused", out)
|
|
|
|
def test_different_component_levels_refused(self):
|
|
code, out, _ = run_cli("merge", os.path.join(HERE, "sample_component_table.json"), os.path.join(HERE, "sample_component_kernel.json"))
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("COMPONENT levels differ", out)
|
|
|
|
def test_same_level_same_machine_merges_and_other_machine_refused(self):
|
|
a = os.path.join(HERE, "sample_component_startup_ours.json")
|
|
b = os.path.join(HERE, "sample_component_startup_vanilla.json")
|
|
code, out, _ = run_cli("merge", a, b)
|
|
self.assertEqual((code, out.strip()), (0, "MERGED 2 records of COMPONENT_STARTUP on sample-machine"))
|
|
other = load("sample_component_startup_vanilla.json")
|
|
other["machine"]["machine_role"] = "other-machine"
|
|
with tempfile.TemporaryDirectory() as tmp:
|
|
path = os.path.join(tmp, "other.json")
|
|
with open(path, "w", encoding="utf-8") as handle:
|
|
json.dump(other, handle)
|
|
code, out, _ = run_cli("merge", a, path)
|
|
self.assertEqual(code, 1)
|
|
self.assertIn("different machines", out)
|
|
|
|
def test_e2e_validator_refuses_component_in_its_own_merge(self):
|
|
proc = subprocess.run([sys.executable, os.path.join(HERE, "validate.py"), "merge", os.path.join(HERE, "sample_ours.json"),
|
|
os.path.join(HERE, "sample_component_table.json")], stdout=subprocess.PIPE, universal_newlines=True, cwd=REPO)
|
|
self.assertEqual(proc.returncode, 1)
|
|
self.assertIn("END_TO_END with COMPONENT refused", proc.stdout)
|
|
|
|
def test_end_to_end_record_is_not_a_component_record(self):
|
|
self.assertEqual(codes(load("sample_ours.json")), ["LEVEL_NOT_COMPONENT"])
|
|
|
|
|
|
class SharedWithStra246(unittest.TestCase):
|
|
def test_component_schema_redefines_nothing_of_246(self):
|
|
shared = set(E2E.load_schema()["definitions"])
|
|
own = set(C.load_schema()["definitions"])
|
|
self.assertEqual(shared & own, set())
|
|
C.all_definitions(C.load_schema()) # raises on a clash
|
|
|
|
def test_shared_blocks_validate_against_the_246_definitions(self):
|
|
schema246 = E2E.load_schema()
|
|
defs = schema246["definitions"]
|
|
ours = load("sample_component_startup_ours.json")
|
|
errors = []
|
|
E2E.interpret(defs["build_id"], ours["build_identity"], "/build_identity", defs, errors)
|
|
self.assertEqual(errors, [])
|
|
vanilla = load("sample_component_startup_vanilla.json")
|
|
E2E.interpret(defs["vanilla_cpu_family"], vanilla["vanilla_cpu_family"], "/vanilla_cpu_family", defs, errors)
|
|
self.assertEqual(errors, [])
|
|
# the 246 kernel_lines pattern and cpu-line constants are the ones used here
|
|
c246 = schema246["constants"]
|
|
cc = C.load_schema()["constants"]
|
|
self.assertEqual(cc["ours_cpu_line_regex"], c246["ours_cpu_line_regex"])
|
|
self.assertEqual(cc["bare_cpu_line_regex"], c246["bare_cpu_line_regex"])
|
|
self.assertEqual(schema246["root"]["properties"]["kernel_lines"], C.load_schema()["levels"]["COMPONENT_STARTUP"]["properties"]["kernel_lines"])
|
|
|
|
def test_header_hashes_and_commits_use_the_246_patterns(self):
|
|
for name in ("sample_component_kernel.json", "sample_component_startup_vanilla.json"):
|
|
rec = load(name)
|
|
rec["created_utc"] = "2026-01-01 00:00:00"
|
|
self.assertEqual(codes(rec), ["BAD_PATTERN"], name)
|
|
rec = load("sample_component_kernel.json")
|
|
rec["kab1_manifest_sha256"] = "ABC"
|
|
self.assertEqual(codes(rec), ["BAD_PATTERN"])
|
|
rec = load("sample_component_startup_vanilla.json")
|
|
rec["build_identity"]["strata_upstream_commit"] = "xyz"
|
|
self.assertEqual(codes(rec), ["RULE_BUILD_IDENTITY_FORM"])
|
|
|
|
|
|
class TableRules(unittest.TestCase):
|
|
def test_equal_interval_edges(self):
|
|
low, high = math.log(0.99), math.log(1.01)
|
|
rec, row = table_row("expert_cpu")
|
|
for ci_low, ci_high, ok in [(low, high, True), (low - 1e-9, high, False), (low, high + 1e-9, False), (-1e-9, 0.0, True), (1e-9, 0.005, False)]:
|
|
row["paired"].update(ci95_low=ci_low, ci95_high=ci_high, log_ratio_mean=min(max(0.0, ci_low), ci_high))
|
|
self.assertEqual("RULE_EQUAL_INTERVAL" in codes(rec), not ok, (ci_low, ci_high))
|
|
|
|
def test_equal_is_not_a_loose_one_percent_half_width(self):
|
|
# SDET remark D: mean -1 percent with half-width 1 percent contains 0 but the CI leaves [ln 0.99, ln 1.01]
|
|
rec, row = table_row("expert_cpu")
|
|
row["paired"].update(log_ratio_mean=-0.0100, ci95_low=-0.0200, ci95_high=0.0000)
|
|
self.assertIn("RULE_EQUAL_INTERVAL", codes(rec))
|
|
|
|
def test_inconclusive_is_a_legal_class_at_any_n(self):
|
|
rec, row = table_row("expert_cpu")
|
|
row["class"] = "INCONCLUSIVE"
|
|
self.assertEqual(codes(rec), [])
|
|
rec, row = table_row("weight_load")
|
|
self.assertEqual(row["class"], "INCONCLUSIVE")
|
|
del row["class"]
|
|
self.assertEqual(codes(rec), [])
|
|
|
|
def test_class_vocabulary_is_closed(self):
|
|
for word in ("faster", "TIE", "OK", "CONFIRMED", ""):
|
|
rec, row = table_row("prefill_gemm")
|
|
row["class"] = word
|
|
self.assertEqual(codes(rec), ["BAD_VALUE"], word)
|
|
|
|
def test_suspected_and_confirmation_states(self):
|
|
rec, row = table_row("decode_attention")
|
|
self.assertEqual((row["class"], row["suspected"]), ("SLOWER", True))
|
|
self.assertNotIn("confirmation", row)
|
|
rec, row = table_row("host_sync")
|
|
self.assertEqual((row["class"], row["suspected"]), ("CONFIRMED-SLOWER", False))
|
|
rec, row = table_row("route_topk")
|
|
self.assertEqual((row["class"], row["suspected"]), ("NOT-CONFIRMED", False))
|
|
row["suspected"] = True
|
|
self.assertEqual(codes(rec), ["RULE_SUSPECTED"])
|
|
|
|
def test_small_n_never_carries_a_verdict(self):
|
|
for word in ("FASTER", "SLOWER", "EQUAL", "CONFIRMED-SLOWER", "NOT-CONFIRMED"):
|
|
rec, row = table_row("weight_load")
|
|
row["class"] = word
|
|
self.assertIn("RULE_SMALL_N_CLASS", codes(rec), word)
|
|
rec, row = table_row("weight_load")
|
|
row["n"] = 29
|
|
self.assertEqual(codes(rec), [])
|
|
row["n"] = 30
|
|
self.assertEqual(sorted(set(codes(rec))), ["RULE_PAIRED_REQUIRED"])
|
|
|
|
def test_unmapped_and_repeated_components(self):
|
|
rec = load("sample_component_table.json")
|
|
rec["rows"].append(copy.deepcopy(rec["rows"][0]))
|
|
self.assertEqual(codes(rec), ["RULE_COMPONENT_UNMAPPED"])
|
|
rec = load("sample_component_table.json")
|
|
rec["stage_to_component"].append({"stage": "prefill", "component": "prefill_gemm"})
|
|
self.assertEqual(codes(rec), ["RULE_MAPPING_DUPLICATE"])
|
|
|
|
def test_log_ratio_convention_is_fixed(self):
|
|
rec = load("sample_component_table.json")
|
|
rec["log_ratio_convention"] = "positive_means_ours_slower"
|
|
self.assertEqual(codes(rec), ["BAD_VALUE"])
|
|
|
|
|
|
class KernelRules(unittest.TestCase):
|
|
def test_bitwise_record_valid_and_tolerance_is_forbidden_with_it(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["equality"] = {"mode": "bitwise", "verdict": "EQUAL", "compared_values": 20480, "mismatches": 0}
|
|
self.assertEqual(codes(rec), [])
|
|
rec["equality"]["tolerance"] = {"value": 1e-6, "basis": "x", "basis_written_utc": "2026-01-01T00:00:00Z"}
|
|
self.assertEqual(codes(rec), ["RULE_EQUALITY_MODE"])
|
|
|
|
def test_not_equal_verdict_needs_mismatches(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["equality"] = {"mode": "bitwise", "verdict": "NOT_EQUAL", "compared_values": 100, "mismatches": 0}
|
|
self.assertEqual(codes(rec), ["RULE_EQUALITY_MODE"])
|
|
rec["equality"]["mismatches"] = 4
|
|
self.assertEqual(codes(rec), [])
|
|
|
|
def test_basis_written_at_run_start_is_allowed_after_is_not(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["equality"]["tolerance"]["basis_written_utc"] = rec["run_started_utc"]
|
|
self.assertEqual(codes(rec), [])
|
|
rec["equality"]["tolerance"]["basis_written_utc"] = "2026-01-01T00:30:01Z"
|
|
self.assertEqual(codes(rec), ["RULE_TOLERANCE_BASIS_ORDER"])
|
|
|
|
def test_resident_regime_has_no_streamed_block(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["regime"] = "resident"
|
|
self.assertEqual(codes(rec), ["RULE_REGIME_STREAMED"])
|
|
del rec["streamed"]
|
|
self.assertEqual(codes(rec), [])
|
|
|
|
def test_streamed_working_set_must_exceed_last_level_cache(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["streamed"].update(copies=10, expert_bytes=1000, llc_bytes=10000)
|
|
self.assertEqual(codes(rec), ["RULE_REGIME_STREAMED"])
|
|
rec["streamed"]["llc_bytes"] = 9999
|
|
self.assertEqual(codes(rec), [])
|
|
|
|
def test_duplicate_row_type_and_cycles_unit(self):
|
|
rec = load("sample_component_kernel.json")
|
|
self.assertEqual([r["unit"] for r in rec["rows"]], ["ns", "cycles"])
|
|
rec["rows"].append(copy.deepcopy(rec["rows"][0]))
|
|
self.assertEqual(codes(rec), ["RULE_KERNEL_ROW_DUPLICATE"])
|
|
rec = load("sample_component_kernel.json")
|
|
rec["rows"][0]["unit"] = "ms"
|
|
self.assertEqual(codes(rec), ["BAD_VALUE"])
|
|
|
|
def test_tree_and_pin_vocabulary(self):
|
|
rec = load("sample_component_kernel.json")
|
|
rec["tree"]["ours"] = "avx10"
|
|
self.assertEqual(codes(rec), ["BAD_VALUE"])
|
|
rec = load("sample_component_kernel.json")
|
|
rec["pin"]["logical_cpu"] = -1
|
|
self.assertEqual(codes(rec), ["OUT_OF_RANGE"])
|
|
|
|
|
|
class StartupRules(unittest.TestCase):
|
|
def test_ours_gpu_lines_optional_cpu_line_required(self):
|
|
rec = load("sample_component_startup_ours.json")
|
|
rec["kernel_lines"] = [line for line in rec["kernel_lines"] if "gpu" not in line]
|
|
self.assertEqual(codes(rec), [])
|
|
rec["kernel_lines"] = ["leleka-serve gpu: sample device line"]
|
|
self.assertEqual(codes(rec), ["RULE_OURS_CPU_LINE"])
|
|
|
|
def test_bare_and_look_alike_prefixes_are_not_ours_lines(self):
|
|
for line in ("cpu: x", "leleka-serve cpu: x", "leleka-serve cpux", "xleleka-serve cpu: x", "leleka-serve: cpu: x"):
|
|
rec = load("sample_component_startup_ours.json")
|
|
rec["kernel_lines"].append(line)
|
|
self.assertEqual(codes(rec), ["BAD_PATTERN"], line)
|
|
|
|
def test_vanilla_printed_lines_allowed_but_not_cpu_lines(self):
|
|
rec = load("sample_component_startup_vanilla.json")
|
|
rec["vanilla_cpu_family"]["printed"] = ["this CPU has no AVX-512: the expert kernels run on AVX-2"]
|
|
self.assertEqual(codes(rec), [])
|
|
rec["vanilla_cpu_family"]["control"]["printed"] = ["cpu: kernel family avx512"]
|
|
self.assertEqual(codes(rec), ["RULE_VANILLA_CLAIMS_CPU"])
|
|
rec = load("sample_component_startup_vanilla.json")
|
|
rec["vanilla_cpu_family"]["printed"] = ["leleka-serve cpu: x"]
|
|
self.assertEqual(codes(rec), ["RULE_VANILLA_CLAIMS_CPU"])
|
|
|
|
def test_vanilla_block_needs_predicate_or_unavailable_marker(self):
|
|
rec = load("sample_component_startup_vanilla.json")
|
|
rec["vanilla_cpu_family"]["predicate"] = "not run"
|
|
self.assertEqual(codes(rec), ["BAD_PATTERN"])
|
|
rec["vanilla_cpu_family"]["predicate"] = {"tool": "iq_avx2_parity", "output": "avx2=1 avx512=1"}
|
|
self.assertEqual(codes(rec), [])
|
|
|
|
def test_ours_and_vanilla_build_identity_forms_are_not_interchangeable(self):
|
|
rec = load("sample_component_startup_ours.json")
|
|
rec["build_identity"] = load("sample_component_startup_vanilla.json")["build_identity"]
|
|
self.assertEqual(codes(rec), ["RULE_BUILD_IDENTITY_FORM"])
|
|
rec = load("sample_component_startup_vanilla.json")
|
|
rec["build_identity"] = load("sample_component_startup_ours.json")["build_identity"]
|
|
self.assertIn("RULE_BUILD_IDENTITY_FORM", codes(rec))
|
|
|
|
|
|
class Hygiene(unittest.TestCase):
|
|
FILES = ["validate_component.py", "test_validate_component.py"]
|
|
|
|
def test_stdlib_only(self):
|
|
stdlib = set(sys.stdlib_module_names) if hasattr(sys, "stdlib_module_names") else {
|
|
"ast", "copy", "json", "math", "os", "re", "subprocess", "sys", "tempfile", "unittest", "validate", "validate_component"}
|
|
local = {"validate", "validate_component"}
|
|
for name in self.FILES:
|
|
with open(os.path.join(HERE, name), "r", encoding="utf-8") as handle:
|
|
tree = ast.parse(handle.read(), name)
|
|
for node in ast.walk(tree):
|
|
modules = []
|
|
if isinstance(node, ast.Import):
|
|
modules = [a.name.split(".")[0] for a in node.names]
|
|
elif isinstance(node, ast.ImportFrom) and node.module:
|
|
modules = [node.module.split(".")[0]]
|
|
for module in modules:
|
|
self.assertTrue(module in stdlib or module in local, "%s imports %s" % (name, module))
|
|
|
|
def test_python_39_syntax(self):
|
|
for name in self.FILES:
|
|
with open(os.path.join(HERE, name), "r", encoding="utf-8") as handle:
|
|
ast.parse(handle.read(), name, feature_version=(3, 9))
|
|
|
|
def test_schema_uses_only_keywords_the_246_evaluator_supports(self):
|
|
supported = {"$comment", "$ref", "anyOf", "type", "const", "enum", "minLength", "pattern", "minimum", "exclusiveMinimum", "maximum",
|
|
"required", "properties", "additionalProperties", "minItems", "items"}
|
|
|
|
def walk(node, path):
|
|
if isinstance(node, dict):
|
|
for key, child in node.items():
|
|
if key == "properties":
|
|
for name, sub in child.items():
|
|
walk(sub, path + "/" + name)
|
|
elif key == "anyOf":
|
|
for index, sub in enumerate(child):
|
|
walk(sub, "%s/%d" % (path, index))
|
|
elif key == "items":
|
|
walk(child, path + "/items")
|
|
else:
|
|
self.assertIn(key, supported, "unsupported keyword %s at %s" % (key, path))
|
|
schema = C.load_schema()
|
|
for name, sub in schema["definitions"].items():
|
|
walk(sub, "definitions/" + name)
|
|
for name, sub in schema["levels"].items():
|
|
walk(sub, "levels/" + name)
|
|
|
|
def test_samples_are_marked_synthetic_and_hold_no_real_paths(self):
|
|
for name in SAMPLES:
|
|
text = json.dumps(load(name))
|
|
self.assertTrue(load(name)["synthetic"], name)
|
|
self.assertNotRegex(text, r"[A-Za-z]:\\\\|/home/|/data/|/Users/", name)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|