Beispiel #1
0
    def test_get_dfr(self):
        """Ensures correct output from get_dfr; input values are non-zero."""

        this_dfr = model_eval.get_dfr(CONTINGENCY_TABLE_THRESHOLD_HALF)
        self.assertTrue(numpy.isclose(
            this_dfr, DFR_THRESHOLD_HALF, atol=TOLERANCE
        ))
    def test_get_dfr_all_zeros(self):
        """Ensures correct output from get_dfr; input values are all zero."""

        this_dfr = model_eval.get_dfr(CONTINGENCY_TABLE_ALL_ZEROS)
        self.assertTrue(numpy.isnan(this_dfr))