Description:
Add pytest unit tests for the Hello Synchrony notebook pipeline to ensure reproducibility.
Context:
Notebooks can silently break. Unit tests with shape checks and golden outputs ensure the pipeline keeps working.
Tasks:
Acceptance Criteria:
Example test structure:
import numpy as np
import pytest
from hypyp import analyses
def test_simulated_data_shape():
data = generate_simulated_data(n_channels=32, n_epochs=10)
assert data[0].shape == (10, 32, 1000) # (epochs, channels, samples)
def test_plv_output_range():
plv = analyses.compute_sync(data, metric='plv')
assert np.all(plv >= 0) and np.all(plv <= 1)
def test_golden_output():
result = run_hello_synchrony_pipeline(seed=42)
expected = np.load('tests/golden/hello_synchrony_expected.npy')
np.testing.assert_allclose(result, expected, rtol=1e-5)
Description:
Add pytest unit tests for the Hello Synchrony notebook pipeline to ensure reproducibility.
Context:
Notebooks can silently break. Unit tests with shape checks and golden outputs ensure the pipeline keeps working.
Tasks:
tests/test_hello_synchrony.pyAcceptance Criteria:
pytest tests/test_hello_synchrony.pyExample test structure: