Skip to content

Commit 145a4cc

Browse files
committed
update tests
1 parent cccc888 commit 145a4cc

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

tests/translator/foraging/test_foraging_translator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def test_load_time(behavioral_session_output_fixture):
2727
def test_load_trials(behavioral_session_output_fixture, trials_df_fixture):
2828
trials = foraging.load_trials(behavioral_session_output_fixture)
2929

30+
trials_df_fixture['change_frame'] += 1
31+
3032
pd.testing.assert_frame_equal(
3133
trials,
3234
trials_df_fixture,

visual_behavior/translator/foraging/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def stringify(x):
188188
trials[col] = trials[col].map(stringify)
189189

190190
trials['change_frame'] = trials['change_frame'].map(lambda x: int(x) if np.isfinite(x) else None) + 1
191+
191192
trials["change_image_category"] = trials["change_image_category"].apply(lambda x: x if x else '') # use empty string instead of NoneType
192193
trials["change_image_name"] = trials["change_image_name"].apply(lambda x: x if x else '') # use empty string instead of NoneType
193194
trials["initial_image_category"] = trials["initial_image_category"].apply(lambda x: x if x else '') # use empty string instead of NoneType

0 commit comments

Comments
 (0)