-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_build_manager.py
More file actions
39 lines (33 loc) · 1.04 KB
/
test_build_manager.py
File metadata and controls
39 lines (33 loc) · 1.04 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import sys
import json
import shutil
from pathlib import Path
import subprocess
# Add scripts to path
sys.path.insert(0, str(Path(__file__).parent.parent / "scripts"))
from build_manager import BuildManager, BuildConfig
def test_build_config_creation():
"""Test BuildConfig initialization"""
config = BuildConfig(
build_type="Debug",
generator="Unix Makefiles",
preset="development"
)
assert config.build_type == "Debug"
assert config.generator == "Unix Makefiles"
def test_build_manager_init():
"""Test BuildManager initialization"""
manager = BuildManager()
assert manager.project_root is not None
assert manager.build_dir.exists()
def test_version_file_creation():
"""Test version file creation and parsing"""
manager = BuildManager()
version_file = manager.get_version_file()
assert version_file.suffix == ".json"
if __name__ == "__main__":
test_build_config_creation()
test_build_manager_init()
test_version_file_creation()
print("All tests passed!")