Skip to content

Commit

Permalink
Fix test where tstart == tstop
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu committed Jul 10, 2020
1 parent f443d13 commit f0d9848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f0d9848

Please sign in to comment.