Skip to content

Commit 03f0b05

Browse files
committed
Remove redundant and basic fit tests from unit suite
Deleted test_fitting_methods.py and test_likelihood_data_selection.py, and removed basic fit tests from test_classifier.py and test_decoder.py. These tests were either redundant, covered by integration tests, or too basic to provide meaningful coverage. This streamlines the test suite and focuses on more robust and relevant test cases.
1 parent 9fa2e34 commit 03f0b05

File tree

4 files changed

+0
-1213
lines changed

4 files changed

+0
-1213
lines changed

replay_trajectory_classification/tests/unit/test_classifier.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,26 +123,6 @@ def test_clusterless_classifier_construction():
123123
assert len(classifier.environments) == 2
124124

125125

126-
def test_clusterless_classifier_fit_basic():
127-
"""Test that ClusterlessClassifier can fit to data."""
128-
environments = [make_1d_env("env1", n=10)] # Use more bins
129-
classifier = ClusterlessClassifier(environments=environments)
130-
131-
# Create simple training data with proper format
132-
multiunit_data = make_simple_multiunit_data(n_electrodes=2, n_time=100)
133-
position = np.linspace(0, 9, 100).reshape(-1, 1) # Proper range
134-
135-
try:
136-
classifier.fit(multiunit_data, position)
137-
# Basic check that fitting completed without error
138-
assert True # If we get here, fit didn't crash
139-
except Exception as e:
140-
# If there's an environment/morphology issue, skip gracefully
141-
if "tuple index out of range" in str(e) or "IndexError" in str(e):
142-
pytest.skip(f"Environment fitting issue: {e}")
143-
else:
144-
raise
145-
146126

147127
def test_clusterless_classifier_predict_requires_fit():
148128
"""Test that predict requires the classifier to be fit first."""

replay_trajectory_classification/tests/unit/test_decoder.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,6 @@ def test_clusterless_decoder_construction():
154154
assert decoder.environment.environment_name == "test_env"
155155

156156

157-
def test_clusterless_decoder_fit_basic():
158-
"""Test that ClusterlessDecoder can fit to data."""
159-
from replay_trajectory_classification.environments import Environment
160-
environment = Environment(environment_name="test_env")
161-
decoder = ClusterlessDecoder(environment=environment, infer_track_interior=False)
162-
163-
# Create simple training data with proper format and range
164-
multiunit_data = make_simple_multiunit_data(n_electrodes=2, n_features=4, n_time=200)
165-
position = np.linspace(0, 100, 200).reshape(-1, 1) # Realistic track length
166-
167-
try:
168-
decoder.fit(multiunit_data, position)
169-
# Basic check that fitting completed without error
170-
assert True # If we get here, fit didn't crash
171-
except IndexError as e:
172-
if "tuple index out of range" in str(e):
173-
pytest.skip(f"Environment boundary calculation issue with synthetic 1D data: {e}")
174-
else:
175-
raise
176157

177158

178159
def test_clusterless_decoder_predict_requires_fit():

0 commit comments

Comments
 (0)