def test_binomial(self, df_to_output_mock): main() df = df_to_output_mock.call_args_list[0][0][1] self.assertEqual(len(df), 10) self.assertTrue(all([round(x, 0) == x for x in df.c0])) self.assertTrue(all([x >= 0 for x in df.c0])) self.assertTrue(all([x <= 10 for x in df.c0]))
def test_gamma(self, df_to_output_mock): main() df = df_to_output_mock.call_args_list[0][0][1] self.assertEqual(len(df), 10) self.assertTrue(all([x >= 0 for x in df.c0]))
def test_normal(self, df_to_output_mock): main() df = df_to_output_mock.call_args_list[0][0][1] self.assertEqual(len(df), 10) self.assertTrue(df.c0.mean() < 100) self.assertTrue(df.c0.mean() > -100)