From f0d9848eb3f522f3c036804add0080b004cf7395 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Fri, 10 Jul 2020 16:25:57 +0200 Subject: [PATCH] Fix test where tstart == tstop --- python/tests/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tests/test.py b/python/tests/test.py index fca0f5ad..75eaa6fc 100644 --- a/python/tests/test.py +++ b/python/tests/test.py @@ -318,8 +318,8 @@ def test_get_reports_from_population(self): self.assertEqual(len(sel.times), 3) # Number of timestamp (0.8, 1.0 and 1.2) with self.assertRaises(SonataError): self.test_obj['All'].get(tstart=5.) # tstart out of range - self.test_obj['All'].get(tstart=3., tstop=3.) # tstart should be < tstop - np.testing.assert_allclose(np.array(self.test_obj['All'].get(node_ids=[3, 4], tstart=0.2, tstop=0.4).data[0]), [11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9], 1e-6, 0) + np.testing.assert_allclose(self.test_obj['All'].get(node_ids=[1, 2], tstart=3., tstop=3.).data[0], [150.0, 150.1, 150.2, 150.3, 150.4, 150.5, 150.6, 150.7, 150.8, 150.9]) # tstart should be <= tstop + np.testing.assert_allclose(self.test_obj['All'].get(node_ids=[3, 4], tstart=0.2, tstop=0.4).data[0], [11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9], 1e-6, 0) if __name__ == '__main__': unittest.main()