fix(lint): remove unused imports and reformat with black
This commit is contained in:
@@ -159,7 +159,7 @@ def test_homepage_and_options_page_render() -> None:
|
||||
assert "RuntimeError" not in backtests_workspace_text
|
||||
assert "Server error" not in backtests_workspace_text
|
||||
assert "Traceback" not in backtests_workspace_text
|
||||
|
||||
|
||||
# Test backtest run by filling in fixture-supported dates
|
||||
page.get_by_label("Start date").fill("2024-01-02")
|
||||
page.get_by_label("End date").fill("2024-01-08")
|
||||
@@ -184,7 +184,7 @@ def test_homepage_and_options_page_render() -> None:
|
||||
# Page should render without runtime errors
|
||||
assert "RuntimeError" not in event_workspace_text
|
||||
assert "Traceback" not in event_workspace_text
|
||||
|
||||
|
||||
# Fill in value and run comparison
|
||||
page.get_by_label("Initial portfolio value").fill("100000")
|
||||
page.get_by_role("button", name="Run comparison").click()
|
||||
@@ -194,14 +194,14 @@ def test_homepage_and_options_page_render() -> None:
|
||||
# Should have results or error, but not runtime crash
|
||||
assert "RuntimeError" not in event_result_text
|
||||
assert "Traceback" not in event_result_text
|
||||
|
||||
|
||||
# Test preset selection
|
||||
page.get_by_label("Event preset").click()
|
||||
page.get_by_text("GLD January 2024 Drawdown", exact=True).click()
|
||||
page.wait_for_timeout(1000)
|
||||
event_preset_text = page.locator("body").inner_text(timeout=15000)
|
||||
assert "RuntimeError" not in event_preset_text
|
||||
|
||||
|
||||
page.goto(workspace_url, wait_until="domcontentloaded", timeout=30000)
|
||||
overview_text = page.locator("body").inner_text(timeout=15000)
|
||||
assert "Hedge Analysis" in overview_text
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for page validation functions and constants."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date, timedelta
|
||||
@@ -218,7 +219,7 @@ class TestValidateDateRangeForSymbolBoundaryCases:
|
||||
"""Test that start > end is caught before symbol-specific bounds."""
|
||||
# Inverted range that's also before GLD launch
|
||||
start = date(2000, 1, 1) # Before GLD launch
|
||||
end = date(1999, 1, 1) # Before start
|
||||
end = date(1999, 1, 1) # Before start
|
||||
error = validate_date_range_for_symbol(start, end, "GLD")
|
||||
# Should get "start > end" error, not "before min date" error
|
||||
assert error is not None
|
||||
@@ -311,4 +312,4 @@ class TestValidateNumericInputs:
|
||||
error_low = validate_numeric_inputs(1000.0, 50000.0, 0.01)
|
||||
assert error_low is None
|
||||
error_high = validate_numeric_inputs(1000.0, 50000.0, 0.99)
|
||||
assert error_high is None
|
||||
assert error_high is None
|
||||
|
||||
Reference in New Issue
Block a user