diff --git a/.tests/conftest.py b/.tests/conftest.py new file mode 100644 index 0000000..635ed62 --- /dev/null +++ b/.tests/conftest.py @@ -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"]