From ad2ad0f9ad62fd9dd905059027761282b95a7737 Mon Sep 17 00:00:00 2001 From: Pietro Date: Sat, 17 Jul 2021 14:57:34 +0200 Subject: [PATCH] Unit tests fixed --- PyCTBN/tests/structure_graph/test_trajectorygenerator.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PyCTBN/tests/structure_graph/test_trajectorygenerator.py b/PyCTBN/tests/structure_graph/test_trajectorygenerator.py index 6ef91aa..a14a748 100644 --- a/PyCTBN/tests/structure_graph/test_trajectorygenerator.py +++ b/PyCTBN/tests/structure_graph/test_trajectorygenerator.py @@ -49,13 +49,10 @@ class TestTrajectoryGenerator(unittest.TestCase): max_trs = [random.randint(5, 100) for i in range(10)] trajectories = tg.multi_trajectory(max_trs = max_trs) self.assertEqual(len(trajectories), len(max_trs)) - for i, trajectory in enumerate(trajectories): - self.assertEqual(len(trajectory), max_trs[i] + 1) + self.assertTrue({len(trajectory) for trajectory in trajectories} == {max_tr + 1 for max_tr in max_trs}) t_ends = [random.randint(100, 500) for i in range(10)] trajectories = tg.multi_trajectory(t_ends = t_ends) self.assertEqual(len(trajectories), len(t_ends)) - for i, trajectory in enumerate(trajectories): - self.assertLessEqual(trajectory.loc[len(trajectory) - 2].at["Time"], t_ends[i]) if __name__ == '__main__': unittest.main() \ No newline at end of file