test_ssh_connection.py 775 B

12345678910111213141516171819202122232425262728293031
  1. # debug_test.py
  2. import sys
  3. sys.path.append('.')
  4. def debug_test():
  5. """调试测试"""
  6. print("🔍 调试测试 - 检查远程目录结构")
  7. try:
  8. from database import DataFetcher
  9. fetcher = DataFetcher()
  10. # 测试目录结构
  11. print("1. 检查远程目录结构...")
  12. fetcher._debug_remote_structure()
  13. # 测试具体风场
  14. print("\n2. 测试7V2xSuma风场...")
  15. columns = fetcher.get_turbine_columns("7V2xSuma")
  16. print(f"列数: {len(columns)}")
  17. fetcher.close_connection()
  18. except Exception as e:
  19. print(f"调试失败: {str(e)}")
  20. import traceback
  21. traceback.print_exc()
  22. if __name__ == "__main__":
  23. debug_test()