"""Basic smoke tests for pyfitparsernative."""

import pytest

from .conftest import SAMPLE_FIT


def test_parse_fit_file_returns_list():
    from pyfitparsernative import parse_fit_file

    result = parse_fit_file(SAMPLE_FIT)
    assert isinstance(result, list)
    assert len(result) > 0
    assert "message_type" in result[0]


def test_parse_fit_bytes_returns_list():
    from pyfitparsernative import parse_fit_bytes

    with open(SAMPLE_FIT, "rb") as f:
        data = f.read()
    result = parse_fit_bytes(data)
    assert isinstance(result, list)
    assert len(result) > 0
    assert "message_type" in result[0]


def test_parse_fit_file_missing_path_raises():
    from pyfitparsernative import parse_fit_file

    with pytest.raises(OSError):
        parse_fit_file("/nonexistent/path/file.fit")
