forked from Open-Coding-Society/pages
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_imports.py
More file actions
40 lines (31 loc) · 1.11 KB
/
test_imports.py
File metadata and controls
40 lines (31 loc) · 1.11 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
40
#!/usr/bin/env python3
import sys
from pathlib import Path
print("Starting minimal test...")
try:
# Test 1: Basic imports
print("Testing basic imports...")
import os, datetime, zipfile
print("✅ Basic imports successful")
# Test 2: Mammoth import
print("Testing mammoth import...")
import mammoth
print("✅ Mammoth import successful")
# Test 3: FrontMatterManager import
print("Testing FrontMatterManager import...")
sys.path.append('scripts')
from frontmatter_manager import FrontMatterManager
print("✅ FrontMatterManager import successful")
# Test 4: FrontMatterManager initialization
print("Testing FrontMatterManager initialization...")
fm = FrontMatterManager("_docx")
print("✅ FrontMatterManager initialization successful")
# Test 5: DocxConverter import
print("Testing DocxConverter import...")
from convert_docx import DocxConverter
print("✅ DocxConverter import successful")
print("All tests passed!")
except Exception as e:
print(f"❌ Error: {e}")
import traceback
traceback.print_exc()