From a5db2d65c2e7f714dc014421baec62917d1c831c Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Tue, 7 Jan 2025 20:11:55 +0000 Subject: [PATCH] Tweaks to tests --- .flake8 | 1 + .gitignore | 1 + tests/test_leak_correct.py | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index ab31112..d9c202a 100644 --- a/.flake8 +++ b/.flake8 @@ -16,3 +16,4 @@ ignore = exclude= .git, venv, + tests/test_data, diff --git a/.gitignore b/.gitignore index 353c69e..6ab7484 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /tests/test_data +/test_output *.pyc *.DS_Store *__pycache__* diff --git a/tests/test_leak_correct.py b/tests/test_leak_correct.py index 5ea0e21..2c98421 100644 --- a/tests/test_leak_correct.py +++ b/tests/test_leak_correct.py @@ -28,7 +28,8 @@ def setUp(self): def test_get_QC_dict(self): QC = self.test_trace.get_onboard_QC_values() - return leak_correct.get_QC_dict(QC) + d = leak_correct.get_QC_dict(QC) + self.assertIsInstance(d, dict) def test_plot_leak_fit(self): well = 'A01' @@ -53,7 +54,8 @@ def test_get_leak_correct(self): times = trace.get_times() current = currents[well][sweep, :] - return leak_correct.get_leak_corrected(current, voltage, times, *self.ramp_bounds) + x = leak_correct.get_leak_corrected(current, voltage, times, *self.ramp_bounds) + self.assertEqual(x.shape, (30784,)) if __name__ == "__main__":