def test_setup_for_sync_pulse_sender_synchronize(self): min_time = 0.042 self.patched_library.niTClk_SetupForSyncPulseSenderSynchronize.side_effect = self.side_effects_helper.niTClk_SetupForSyncPulseSenderSynchronize nitclk.setup_for_sync_pulse_sender_synchronize( multiple_session_references, min_time) self.patched_library.niTClk_SetupForSyncPulseSenderSynchronize.assert_called_once_with( _matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViReal64Matcher(min_time)) return
def test_is_done(self): expected_result = True self.side_effects_helper['IsDone']['done'] = expected_result self.patched_library.niTClk_IsDone.side_effect = self.side_effects_helper.niTClk_IsDone actual_result = nitclk.is_done(multiple_session_references) assert actual_result == expected_result self.patched_library.niTClk_IsDone.assert_called_once_with( _matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViBooleanPointerMatcher()) return
def test_synchronize_timedelta(self): min_time = hightime.timedelta(seconds=0.042) self.patched_library.niTClk_Synchronize.side_effect = self.side_effects_helper.niTClk_Synchronize nitclk.synchronize(multiple_session_references, min_time) self.patched_library.niTClk_Synchronize.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViReal64Matcher(min_time.total_seconds())) return
def test_configure_for_homogeneous_triggers(self): self.patched_library.niTClk_ConfigureForHomogeneousTriggers.side_effect = self.side_effects_helper.niTClk_ConfigureForHomogeneousTriggers nitclk.configure_for_homogeneous_triggers(multiple_session_references) self.patched_library.niTClk_ConfigureForHomogeneousTriggers.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions)) return
def test_initialize_multiple_sessions(self): self.patched_library.niTClk_Initiate.side_effect = self.side_effects_helper.niTClk_Initiate nitclk.initiate(multiple_session_references) self.patched_library.niTClk_Initiate.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions)) return
def test_wait_until_done(self): min_time = 4.2 self.patched_library.niTClk_WaitUntilDone.side_effect = self.side_effects_helper.niTClk_WaitUntilDone nitclk.wait_until_done(multiple_session_references, min_time) self.patched_library.niTClk_WaitUntilDone.assert_called_once_with(_matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions), _matchers.ViReal64Matcher(min_time)) return