Example #1
0
 def test__calculate_power(self):
     # Sets up the values to test
     crit = 0.025
     # Sets the known value
     known = 0.5
     # Calculates the test value
     test = _calculate_power(self.alpha, crit)
     # Checks the test value
     npt.assert_almost_equal(known, test)
Example #2
0
 def test__calculate_power_n(self):
     crit = 0.025
     known = np.array([0.5, 0.5])
     alpha = np.vstack((self.alpha, self.alpha))
     test = _calculate_power(alpha, crit)
     npt.assert_almost_equal(known, test)