It works
This commit is contained in:
@@ -9,7 +9,7 @@ from typing import Optional, Dict
|
||||
|
||||
import typer
|
||||
from rich.console import Console
|
||||
from rich.progress import Progress, SpinnerColumn, TextColumn
|
||||
from rich.progress import Progress, SpinnerColumn, TextColumn, TimeElapsedColumn
|
||||
from rich.table import Table
|
||||
import time
|
||||
|
||||
@@ -172,10 +172,10 @@ def generate(
|
||||
console.print(f"[green]OK[/green] Backend initialized: {backend_id}")
|
||||
except Exception as e:
|
||||
import traceback
|
||||
console.print(f"[red]Error initializing backend: {repr(e)}[/red]")
|
||||
console.print(traceback.format_exc())
|
||||
console.print(f"[yellow]Elapsed: {format_duration(time.time() - start_time)}[/yellow]")
|
||||
raise typer.Exit(1)
|
||||
console.print(f"[red]Error initializing backend: {repr(e)}[/red]")
|
||||
console.print(traceback.format_exc())
|
||||
console.print(f"[yellow]Elapsed: {format_duration(time.time() - start_time)}[/yellow]")
|
||||
raise typer.Exit(1)
|
||||
|
||||
# Generate shots
|
||||
generated_shots = []
|
||||
@@ -186,8 +186,10 @@ def generate(
|
||||
with Progress(
|
||||
SpinnerColumn(),
|
||||
TextColumn("[progress.description]{task.description}"),
|
||||
TimeElapsedColumn(),
|
||||
console=console
|
||||
) as progress:
|
||||
progress.add_task("Elapsed", total=None)
|
||||
|
||||
for shot in storyboard_data.shots:
|
||||
task_id = progress.add_task(f"Shot {shot.id}", total=None)
|
||||
|
||||
@@ -113,6 +113,7 @@ class TestGenerateCommand:
|
||||
])
|
||||
assert result.exit_code == 0
|
||||
assert "Dry run complete" in result.output
|
||||
assert "Elapsed:" in result.output
|
||||
|
||||
def test_generate_nonexistent_storyboard(self):
|
||||
"""Test generate with non-existent storyboard."""
|
||||
|
||||
Reference in New Issue
Block a user