def test_result(self):
     sig_results_proc = SignificantResultsProcessor(True)
     class PassElementStub:
         def items(self):
             return [("result", "PASS")]
     self.assertTrue(sig_results_proc._result(PassElementStub()))
     #
     class FailElementStub:
         def items(self):
             return [("result", "FAIL")]
     self.assertFalse(sig_results_proc._result(FailElementStub()))
     #
     class NAElementStub:
         def items(self):
             return [("result", "N/A")]
     self.assertFalse(sig_results_proc._result(NAElementStub()))
Esempio n. 2
0
    def test_result(self):
        sig_results_proc = SignificantResultsProcessor(True)

        class PassElementStub:
            def items(self):
                return [("result", "PASS")]

        self.assertTrue(sig_results_proc._result(PassElementStub()))

        #
        class FailElementStub:
            def items(self):
                return [("result", "FAIL")]

        self.assertFalse(sig_results_proc._result(FailElementStub()))

        #
        class NAElementStub:
            def items(self):
                return [("result", "N/A")]

        self.assertFalse(sig_results_proc._result(NAElementStub()))