Scriptorium / tests /test_modal_app_file.py
Codex
Fix Modal deployment and Magpie runtime integration
1f36bcf
Raw
History Blame Contribute Delete
578 Bytes
from pathlib import Path
def test_modal_app_includes_backend_python_source_in_image() -> None:
source = Path("modal_app.py").read_text(encoding="utf-8")
assert '.add_local_python_source("backend")' in source
assert source.index(".pip_install(") < source.index('.add_local_python_source("backend")')
def test_modal_app_installs_git_before_git_based_pip_dependencies() -> None:
source = Path("modal_app.py").read_text(encoding="utf-8")
assert '.apt_install("git")' in source
assert source.index('.apt_install("git")') < source.index(".pip_install(")