adapt tests to new model behaviour
This commit is contained in:
parent
9c434117fa
commit
b1c5a6b0a4
@ -47,7 +47,7 @@ class LifacNoiseTester(unittest.TestCase):
|
|||||||
self.assertTrue(np.array_equal(spikes, spikes_fast), msg="The spike times between the fast and slow simulation aren't equal")
|
self.assertTrue(np.array_equal(spikes, spikes_fast), msg="The spike times between the fast and slow simulation aren't equal")
|
||||||
|
|
||||||
def test_find_v_offset(self):
|
def test_find_v_offset(self):
|
||||||
v_offsets = [-10, 50, 100, 150, 250]
|
v_offsets = [-2, 50, 100, 150]
|
||||||
threshold = 0.01
|
threshold = 0.01
|
||||||
test_model = self.model.get_model_copy()
|
test_model = self.model.get_model_copy()
|
||||||
stimulus = SinusAmplitudeModulationStimulus(700, 0, 0, amplitude=0) # no stimulus
|
stimulus = SinusAmplitudeModulationStimulus(700, 0, 0, amplitude=0) # no stimulus
|
||||||
@ -69,6 +69,6 @@ class LifacNoiseTester(unittest.TestCase):
|
|||||||
# print("freqs:", goal_freq, measured_freq)
|
# print("freqs:", goal_freq, measured_freq)
|
||||||
self.assertTrue(abs(offset - measured_offset) < 1)
|
self.assertTrue(abs(offset - measured_offset) < 1)
|
||||||
|
|
||||||
def test_fin_v_offset_threshold_limit(self):
|
def test_find_v_offset_threshold_limit(self):
|
||||||
for threshold in [0, -0.0001, -2, -500]:
|
for threshold in [0, -0.0001, -2, -500]:
|
||||||
self.assertRaises(ValueError, self.model.find_v_offset, 700, self.base_sinus, threshold)
|
self.assertRaises(ValueError, self.model.find_v_offset, 300, self.base_sinus, threshold)
|
||||||
|
Loading…
Reference in New Issue
Block a user