Skip to content

Commit

Permalink
Remove load_stimulus_movie from tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Sep 18, 2023
1 parent 5c9b676 commit 4bf04f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
3 changes: 1 addition & 2 deletions allensdk/test/brain_observatory/behavior/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,5 @@ def behavior_ophys_experiment_fixture():

experiment_id = 953443028
experiment = BehaviorOphysExperiment.from_lims(
experiment_id,
load_stimulus_movie=False)
experiment_id)
return experiment
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def test_nwb_end_to_end(tmpdir_factory):

d1 = BehaviorOphysExperiment.from_lims(
oeid,
load_stimulus_movie=False
)
nwbfile = d1.to_nwb()
with NWBHDF5IO(nwb_filepath, "w") as nwb_file_writer:
Expand All @@ -52,7 +51,6 @@ def test_visbeh_ophys_data_set():
data_set = BehaviorOphysExperiment.from_lims(
ophys_experiment_id,
exclude_invalid_rois=False,
load_stimulus_movie=False
)

# TODO: need to improve testing here:
Expand All @@ -68,15 +66,13 @@ def test_visbeh_ophys_data_set():
behavior_session_id = BehaviorSessionId.from_lims(
db=lims_db,
ophys_experiment_id=ophys_experiment_id,
load_stimulus_movie=False
)

# All sorts of assert relationships:
assert (
ForagingId.from_lims(
behavior_session_id=behavior_session_id.value,
lims_db=lims_db,
load_stimulus_movie=False
).value
== data_set.metadata["behavior_session_uuid"]
)
Expand Down Expand Up @@ -167,7 +163,6 @@ def test_legacy_dff_api():
ophys_experiment_id = 792813858
session = BehaviorOphysExperiment.from_lims(
ophys_experiment_id=ophys_experiment_id,
load_stimulus_movie=False
)

_, dff_array = session.get_dff_traces()
Expand All @@ -187,7 +182,6 @@ def test_legacy_dff_api():
def test_stimulus_presentations_omitted(ophys_experiment_id, number_omitted):
session = BehaviorOphysExperiment.from_lims(
ophys_experiment_id,
load_stimulus_movie=False
)
df = session.stimulus_presentations
assert df["omitted"].sum() == number_omitted
Expand All @@ -198,7 +192,6 @@ def test_event_detection():
ophys_experiment_id = 789359614
session = BehaviorOphysExperiment.from_lims(
ophys_experiment_id=ophys_experiment_id,
load_stimulus_movie=False
)
events = session.events

Expand Down Expand Up @@ -229,7 +222,6 @@ def test_BehaviorOphysExperiment_property_data():
ophys_experiment_id = 960410026
dataset = BehaviorOphysExperiment.from_lims(
ophys_experiment_id,
load_stimulus_movie=False
)

assert dataset.ophys_session_id == 959458018
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def test_nwb_end_to_end_session(
tmpdir = pathlib.Path(tmpdir)
nwb_path = tmpdir / f'session_{session_id}.nwb'
session = BehaviorSession.from_lims(
behavior_session_id=session_id,
load_stimulus_movie=False)
behavior_session_id=session_id)
nwb_file = session.to_nwb()
with NWBHDF5IO(nwb_path, 'w') as nwb_file_writer:
nwb_file_writer.write(nwb_file)
Expand Down Expand Up @@ -105,8 +104,7 @@ def test_behavior_session_equivalent_json_lims(session_data_fixture):

behavior_session_id = session_data_fixture['behavior_session_id']
lims_session = BehaviorSession.from_lims(
behavior_session_id,
load_stimulus_movie=False
behavior_session_id
)

assert sessions_are_equal(json_session, lims_session, reraise=True)
Expand All @@ -119,6 +117,5 @@ def test_eye_tracking_loaded_with_metadata_frame(self):
sess_id = 1154034257

sess = BehaviorSession.from_lims(behavior_session_id=sess_id,
lims_db=self.dbconn,
load_stimulus_movie=False)
lims_db=self.dbconn)
assert not sess.eye_tracking.empty
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def test_incomplete_eye_tracking_from_lims(

incomplete_exp_id = 806456687
incomplete_experiment = BehaviorOphysExperiment.from_lims(
incomplete_exp_id,
load_stimulus_movie=False)
incomplete_exp_id)
complete = behavior_ophys_experiment_fixture.eye_tracking
incomplete = incomplete_experiment.eye_tracking

Expand Down

0 comments on commit 4bf04f0

Please sign in to comment.