From 38ea7646f5d957d1ce59c23c7b7fcff76fe23f32 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Mon, 18 Dec 2023 13:16:00 +0100 Subject: [PATCH] move the test inwards --- tests/unit/test_ecephys.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index 11e3ba03c..4e71edc84 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -117,23 +117,23 @@ def test_dimensions_warning(self): ) in str(w[-1].message) -def test_get_data_in_units(): - - data = np.asarray([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) - conversion = 1.0 - offset = 3.0 - channel_conversion = np.asarray([2.0, 2.0]) - electrical_series = mock_ElectricalSeries( - data=data, - conversion=conversion, - offset=offset, - channel_conversion=channel_conversion, - ) - - data_in_units = electrical_series.get_data_in_units() - expected_data = data * conversion * channel_conversion[:, np.newaxis] + offset - - np.testing.assert_almost_equal(data_in_units, expected_data) + def test_get_data_in_units(self): + + data = np.asarray([[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) + conversion = 1.0 + offset = 3.0 + channel_conversion = np.asarray([2.0, 2.0]) + electrical_series = mock_ElectricalSeries( + data=data, + conversion=conversion, + offset=offset, + channel_conversion=channel_conversion, + ) + + data_in_units = electrical_series.get_data_in_units() + expected_data = data * conversion * channel_conversion[:, np.newaxis] + offset + + np.testing.assert_almost_equal(data_in_units, expected_data) class SpikeEventSeriesConstructor(TestCase):