ibllib.tests.extractors.test_extractors

Test trials, wheel and camera extractors.

Functions

wheelMoves_fixture

Decorator to save some dummy wheelMoves ALF files for extraction tests

Classes

MockExtracor

TestBaseExtractorSavingMethods

TestCameraExtractors

TestExtractTrialData

TestSyncWheelBpod

TestWheelLoaders

wheelMoves_fixture(func)[source]

Decorator to save some dummy wheelMoves ALF files for extraction tests

class TestExtractTrialData(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_feedbackType()[source]
test_get_contrastLR()[source]
test_get_probabilityLeft()[source]
test_get_choice()[source]
test_get_repNum()[source]
test_get_rewardVolume()[source]
test_get_feedback_times_ge5()[source]
test_get_feedback_times_lt5()[source]
test_get_stimOnTrigger_times()[source]
test_stimOnOffFreeze_times()[source]
test_get_intervals()[source]
test_get_response_times()[source]
test_get_goCueTrigger_times()[source]
test_get_goCueOnset_times()[source]
test_get_included_trials_lt5()[source]
test_get_included_trials_ge5()[source]
test_get_included_trials()[source]
test_get_pause_duration()[source]

Test for extraction of pause periods.

test_encoder_positions_clock_reset()[source]
test_encoder_positions_clock_errors()[source]
test_wheel_folders()[source]
test_load_encoder_positions()[source]
test_load_encoder_events()[source]
test_size_outputs()[source]
tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class TestSyncWheelBpod(methodName='runTest')[source]

Bases: TestCase

test_sync_bpod_bonsai_poor_quality_timestamps()[source]
class TestWheelLoaders(methodName='runTest')[source]

Bases: TestCase

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_encoder_events_corrupt()[source]
test_encoder_positions_corrupts()[source]
class MockExtracor(session_path=None)[source]

Bases: BaseExtractor

save_names = ('some_file.csv', 'some_file.tsv', 'some_file.ssv', 'some_file.npy')

The filenames of each extracted dataset, or None if array should not be saved.

Type:

tuple of str

var_names = ('csv', 'ssv', 'tsv', 'npy')

A list of names for the extracted variables. These become the returned output keys.

Type:

tuple of str

class TestBaseExtractorSavingMethods(methodName='runTest')[source]

Bases: TestCase

setUp() None[source]

Hook method for setting up the test fixture before exercising it.

test_saving_method()[source]
tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class TestCameraExtractors(methodName='runTest')[source]

Bases: TestCase

test_groom_pin_state()[source]
test_attribute_times(display=False)[source]