Buckets:

download
raw
659 Bytes
import subprocess
import sys
from pathlib import Path
import pytest
@pytest.mark.skipif(
not pytest.importorskip("graphviz", reason="graphviz not installed"),
reason="graphviz required",
)
def test_visualize_ast_script(tmp_path: Path) -> None:
sample = tmp_path / "sample.py"
sample.write_text("def hello():\n return 'hi'\n")
output = tmp_path / "out.svg"
subprocess.run(
[
sys.executable,
"scripts/visualize_ast.py",
str(sample),
"--lang",
"python",
"--out",
str(output),
],
check=True,
)
assert output.exists()

Xet Storage Details

Size:
659 Bytes
·
Xet hash:
e8ece0d7a41b7452a647d102736659608579cef52dea4f7d6fc45c805ea6d55d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.