Add exporters, utils, and tests
This commit is contained in:
31
.tests/conftest.py
Normal file
31
.tests/conftest.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
"""Pytest configuration."""
|
||||||
|
|
||||||
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def temp_dir(tmp_path):
|
||||||
|
"""Provide a temporary directory."""
|
||||||
|
return tmp_path
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def sample_session():
|
||||||
|
"""Provide sample session data."""
|
||||||
|
from termflow.core.session import Session, Command
|
||||||
|
|
||||||
|
session = Session(name="test-session")
|
||||||
|
session.add_command(Command(command="ls -la", timestamp="2024-01-01T10:00:00"))
|
||||||
|
session.add_command(Command(command="cd /tmp", timestamp="2024-01-01T10:00:01"))
|
||||||
|
session.add_command(Command(command="pwd", timestamp="2024-01-01T10:00:02"))
|
||||||
|
|
||||||
|
return session
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def sample_commands():
|
||||||
|
"""Provide sample command list."""
|
||||||
|
return ["ls -la", "cd /tmp", "pwd", "ls", "cd /home", "pwd"]
|
||||||
Reference in New Issue
Block a user