-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_structure.py
More file actions
27 lines (22 loc) · 871 Bytes
/
test_structure.py
File metadata and controls
27 lines (22 loc) · 871 Bytes
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
#!/usr/bin/env python3
"""
Test script to debug the folder structure building
"""
import os
from git_repository_manager import GitRepositoryManager
def test_structure_building():
app = GitRepositoryManager()
# Mock some repositories for testing
app.selected_folder = "C:/test"
app.repositories = {
"C:/test/repo1": type('obj', (object,), {'name': 'repo1'}),
"C:/test/folder1/repo2": type('obj', (object,), {'name': 'repo2'}),
"C:/test/folder1/subfolder/repo3": type('obj', (object,), {'name': 'repo3'}),
"C:/test/folder2/repo4": type('obj', (object,), {'name': 'repo4'}),
}
structure = app._build_folder_structure()
print("Built structure:")
import json
print(json.dumps(structure, indent=2, default=str))
if __name__ == "__main__":
test_structure_building()