def test_std(self):
     self.assertEqual(col.stdev([1, 2, 3, 4, 5]),
                      statistics.stdev([1, 2, 3, 4, 5]))
 def test_stdev_random(self):
     file_stdev = col.stdev(self.random_list)
     self.assertEqual(file_stdev, self.calc_pstdev_random_list)
 def test_list_stdev_const_small(self):
     r = gcs.stdev([1])
     self.assertEqual(r, 0)
    def test_list_stdev_list_not_passed(self):

        with self.assertRaises(TypeError) as ex:
            r = gcs.stdev('not a list')
            self.assertEqual(str(ex.exception), 'Stdev undefined')
 def test_stdev_random(self):
     file_stdev = column.stdev(self.random_list)
     self.assertEqual(round(file_stdev, 10),
                      round(self.calc_pstdev_random_list, 10))
 def test_list_stdev_empty_list(self):
     r = gcs.stdev([])
     self.assertEqual(r, None)
 def test_stdev_constant(self):
     self.assertEqual(column.stdev([3, 4, 5, 6]), st.pstdev([3, 4, 5, 6]))
Exemple #8
0
 def test_stdev_constant(self):
     self.assertEqual(get_column_stats.stdev(test_array),
                      self.test_array_std)
Exemple #9
0
 def test_std_one_element(self):
     with self.assertRaises(ValueError):
         get_column_stats.stdev([random.randint(1, 1000)])
Exemple #10
0
 def test_std_empty(self):
     with self.assertRaises(ValueError):
         get_column_stats.stdev([])
Exemple #11
0
 def test_stdev_constant(self):
     self.assertEqual(gcs.stdev([1,2,3,4]),st.pstdev[1,2,3,4])