This commit is contained in:
2026-03-08 23:24:33 -04:00
parent bfbcfcc2af
commit fde0f29e72
16 changed files with 348 additions and 88 deletions

View File

@@ -0,0 +1,35 @@
import os
import subprocess
import shutil
from pathlib import Path
def test_link():
project_root = Path(os.getcwd())
temp_workspace = project_root / "tests" / "artifacts" / "test_link_workspace"
if temp_workspace.exists():
shutil.rmtree(temp_workspace)
temp_workspace.mkdir(parents=True, exist_ok=True)
src_assets = project_root / "assets"
dest_assets = temp_workspace / "assets"
print(f"Linking {src_assets} to {dest_assets}")
if os.name == 'nt':
res = subprocess.run(["cmd", "/c", "mklink", "/D", str(dest_assets), str(src_assets)], capture_output=True, text=True)
print(f"Exit code: {res.returncode}")
print(f"Stdout: {res.stdout}")
print(f"Stderr: {res.stderr}")
else:
os.symlink(src_assets, dest_assets)
if dest_assets.exists():
print("Link exists")
if (dest_assets / "fonts" / "Inter-Regular.ttf").exists():
print("Font file accessible via link")
else:
print("Font file NOT accessible")
else:
print("Link does NOT exist")
if __name__ == "__main__":
test_link()