Example #1
0
    def test_get_npv(self):
        """Ensures correct output from get_npv; input values are non-zero."""

        this_npv = model_eval.get_npv(CONTINGENCY_TABLE_THRESHOLD_HALF)
        self.assertTrue(numpy.isclose(
            this_npv, NPV_THRESHOLD_HALF, atol=TOLERANCE
        ))
    def test_get_npv_all_zeros(self):
        """Ensures correct output from get_npv; input values are all zero."""

        this_npv = model_eval.get_npv(CONTINGENCY_TABLE_ALL_ZEROS)
        self.assertTrue(numpy.isnan(this_npv))