def test_eval_02(self): # --npp 100.0 --npa 100.0 --nap 1.0 --naa 1.0 --kappatest 0.5 output = kappa.calculate_kappa(100.0, 100.0, 1.0, 1.0, 0.5) self.must_contain(output, 'present | 100 | 100') self.must_contain(output, 'absent | 1 | 1') self.must_contain(output, '= 0.0139') self.must_contain(output, 'kappa= 0.5] > 0.9999')
def test_eval_01(self): # --npp 1.0 --npa 1.0 --nap 2.0 --naa 2.0 --kappatest 0.5 output = kappa.calculate_kappa(1.0, 1.0, 2.0, 2.0, 0.5) self.must_contain(output, 'present | 1 | 1') self.must_contain(output, 'absent | 2 | 2') self.must_contain(output, '= 0.3849') self.must_contain(output, 'kappa= 0.5] = 0.9030')
def test_kappa_validate_input_09(self): output = kappa.calculate_kappa(0.0, 0.0, 1.0, 1.0, 0.5) self.must_contain( output, 'Rater A has marked all tests as "absent"; rater B has "present" and "absent"' )
def test_kappa_validate_input_05(self): output = kappa.calculate_kappa(0.0, 1.0, 1.0, 0.0, 0.5) self.must_contain( output, 'Perfect disagreement (some rating pairs are "present/absent", all others are "absent/present")' )
def test_kappa_validate_input_04(self): output = kappa.calculate_kappa(0.0, 0.0, 0.0, 1.0, 0.5) self.must_contain(output, 'Perfect agreement (all rating pairs are "absent")')
def test_kappa_less_than_zero(self): output = kappa.calculate_kappa(1.0, 1.0, 2.0, 2.0, -1) self.must_contain( output, 'Kappatest must be greater than or equal to zero and less than 1')