Translate asset and material parity tests
Some checks failed
Rust API gates / api-gates (push) Has been cancelled
Some checks failed
Rust API gates / api-gates (push) Has been cancelled
This commit is contained in:
@@ -388,10 +388,14 @@ def extract_tests(upstream: Path) -> list[dict[str, object]]:
|
||||
return tests
|
||||
|
||||
|
||||
def review_paths(root: Path) -> list[Path]:
|
||||
review_roots = (root / "tests" / "compat" / "tests", root / "crates")
|
||||
return sorted(path for review_root in review_roots for path in review_root.rglob("*.rs"))
|
||||
|
||||
|
||||
def reviewed_tests(root: Path) -> dict[str, dict[str, object]]:
|
||||
reviews: dict[str, dict[str, object]] = {}
|
||||
tests_root = root / "tests" / "compat" / "tests"
|
||||
for path in sorted(tests_root.rglob("*.rs")):
|
||||
for path in review_paths(root):
|
||||
if path.name == "generated_parity.rs":
|
||||
continue
|
||||
text = path.read_text()
|
||||
@@ -532,7 +536,7 @@ def generate_tests(upstream: Path, output: Path, review_root: Path | None = None
|
||||
|
||||
def scan_parity_markers(root: Path) -> dict[str, list[dict[str, object]]]:
|
||||
markers: defaultdict[str, list[dict[str, object]]] = defaultdict(list)
|
||||
for path in sorted((root / "tests" / "compat" / "tests").rglob("*.rs")):
|
||||
for path in review_paths(root):
|
||||
text = path.read_text()
|
||||
for marker in PARITY_MARKER_RE.finditer(text):
|
||||
next_marker = PARITY_MARKER_RE.search(text, marker.end())
|
||||
|
||||
Reference in New Issue
Block a user