texlab / test_imports.py
syk101's picture
Upload 35 files
f630bbd verified
#!/usr/bin/env python3
"""
Test script to verify that all imports work correctly
"""
import sys
import os
# Add the current directory to Python path
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, current_dir)
print("Current working directory:", os.getcwd())
print("Current directory:", current_dir)
print("Python path:", sys.path)
try:
print("Testing import of controller module...")
import controller
print("โœ“ controller module imported successfully")
except ImportError as e:
print("โœ— Failed to import controller module:", e)
try:
print("Testing import of controller.pix2text_controller...")
from controller.pix2text_controller import pix2text_bp
print("โœ“ controller.pix2text_controller imported successfully")
except ImportError as e:
print("โœ— Failed to import controller.pix2text_controller:", e)
try:
print("Testing import of controller.table_controller...")
from controller.table_controller import table_bp
print("โœ“ controller.table_controller imported successfully")
except ImportError as e:
print("โœ— Failed to import controller.table_controller:", e)
try:
print("Testing import of controller.scribble_controller...")
from controller.scribble_controller import scribble_bp
print("โœ“ controller.scribble_controller imported successfully")
except ImportError as e:
print("โœ— Failed to import controller.scribble_controller:", e)
print("Import test completed.")