Esempio n. 1
0
    def test_is_counted(self):
        sig_results_proc_true = SignificantResultsProcessor(True)
        sig_results_proc_false = SignificantResultsProcessor(False)

        class InsigTrueElementStub:
            def items(self):
                return [("insignificant", "true")]

        self.assertTrue(
            sig_results_proc_true._is_processed(InsigTrueElementStub()))

        class InsigFalseElementStub:
            def items(self):
                return [("insignificant", "false")]

        self.assertTrue(
            sig_results_proc_true._is_processed(InsigTrueElementStub()))

        self.assertTrue(
            sig_results_proc_true._is_processed(InsigFalseElementStub()))

        self.assertFalse(
            sig_results_proc_false._is_processed(InsigTrueElementStub()))

        self.assertTrue(
            sig_results_proc_true._is_processed(InsigFalseElementStub()))
    def test_is_counted(self):
        sig_results_proc_true = SignificantResultsProcessor(True)
        sig_results_proc_false = SignificantResultsProcessor(False)

        class InsigTrueElementStub:
            def items(self):
                return [("insignificant", "true")]
        self.assertTrue(sig_results_proc_true._is_processed(
                                  InsigTrueElementStub()))

        class InsigFalseElementStub:
            def items(self):
                return [("insignificant", "false")]

        self.assertTrue(sig_results_proc_true._is_processed(
                                  InsigTrueElementStub()))

        self.assertTrue(sig_results_proc_true._is_processed(
                                  InsigFalseElementStub()))

        self.assertFalse(sig_results_proc_false._is_processed(
                                  InsigTrueElementStub()))

        self.assertTrue(sig_results_proc_true._is_processed(
                                  InsigFalseElementStub()))