File size: 802 Bytes
6aa6081
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os
import sys


def test_init_script_exists():
    root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    path = os.path.join(root, "init.sh")
    assert os.path.isfile(path), f"init.sh must exist at {path}"


def test_init_script_readable():
    root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    path = os.path.join(root, "init.sh")
    with open(path, "r") as f:
        content = f.read()
    assert "#!/usr/bin/env bash" in content, "init.sh must have bash shebang"
    assert "run_tests" in content, "init.sh must define run_tests function"
    assert "validate_deps" in content, "init.sh must define validate_deps function"


if __name__ == "__main__":
    test_init_script_exists()
    test_init_script_readable()
    print("All basic tests passed.")