Exemple #1
0
    def test03e_calculate_average_mtbf_zero_failures(self):
        """
        (TestCrowAMSAA) calculate_average_mtbf should return 0.0 when calculating the phase average MTBF and the number of failures equals zero
        """

        _mtbfa = calculate_average_mtbf(1000.0, 0.0, 0.0, 0)
        self.assertEqual(_mtbfa, 0.0)
Exemple #2
0
    def test03d_calculate_average_mtbf_zero_test_time(self):
        """
        (TestCrowAMSAA) calculate_average_mtbf should return 0.0 when calculating the phase average MTBF and the test time equals zero
        """

        _mtbfa = calculate_average_mtbf(0.0, 20, 0.0, 0.0)
        self.assertEqual(_mtbfa, 0.0)
Exemple #3
0
    def test03a_calculate_average_mtbf_with_time(self):
        """
        (TestCrowAMSAA) calculate_average_mtbf should return a float value when calculating the phase average MTBF using test time and expected number of failures
        """

        _mtbfa = calculate_average_mtbf(1000.0, 20.0, 0.0, 0.0)
        self.assertEqual(_mtbfa, 50.0)
Exemple #4
0
    def test03c_calculate_average_mtbf_zero_mtbff(self):
        """
        (TestCrowAMSAA) calculate_average_mtbf should return 0.0 when calculating the phase average MTBF and final MTBF equals zero
        """

        _mtbfa = calculate_average_mtbf(0.0, 0.0, 45.0, 0.0)
        self.assertEqual(_mtbfa, 0.0)
Exemple #5
0
    def test03_calculate_average_mtbf_with_mtbf(self):
        """
        (TestCrowAMSAA) calculate_average_mtbf should return a float value when calculating the phase average MTBF using initial and final MTBF
        """

        _mtbfa = calculate_average_mtbf(0.0, 0.0, 45.0, 55.0)
        self.assertEqual(_mtbfa, 50.0)