File size: 844 Bytes
b95e73a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""
Teste básico da migração do AnomalyDetector
"""

import sys
import os

# Add src to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))

def test_basic_import():
    """Test if basic import works"""
    try:
        from models.anomaly_detection import AnomalyDetector
        print("✅ Import AnomalyDetector OK")
        
        # Test instantiation
        detector = AnomalyDetector()
        print(f"✅ AnomalyDetector criado: {detector.model_name}")
        
        return True
        
    except Exception as e:
        print(f"❌ Erro no import: {e}")
        return False

if __name__ == "__main__":
    success = test_basic_import()
    if success:
        print("🎉 Migração básica funcionando!")
    else:
        print("💥 Problemas na migração")
        sys.exit(1)