Team Ai
Apppublic

diegobeyl/backtesting

sourceHugging Faceupdated 9mo agoView on Hugging Face
2likes
test_ui_only.py35 linesDownload Raw Back to tests
1#!/usr/bin/env python32"""Test UI Parameters"""3 4import sys5sys.path.insert(0, '/Users/javier/Projects/backtesting_app_v2')6 7try:8    from backtesting_app.ui.components import convert_direction_filter9    10    # Test direction filter conversion11    test_cases = [12        ('LONG y SHORT', None),13        ('Solo LONG', 'LONG'),14        ('Solo SHORT', 'SHORT'),15    ]16    17    all_passed = True18    for input_val, expected in test_cases:19        result = convert_direction_filter(input_val)20        if result == expected:21            print(f"✅ {input_val} -> {result}")22        else:23            print(f"❌ {input_val} -> Expected {expected}, got {result}")24            all_passed = False25    26    if all_passed:27        print("\n✅ UI Parameters test PASSED")28    else:29        print("\n❌ UI Parameters test FAILED")30        31except Exception as e:32    print(f"❌ Error: {str(e)}")33    import traceback34    traceback.print_exc()35