def test_verbose_does_not_break(): assert abs( kappa.main({ '--verbose': True, '--csv': True, '--filename': 'test/fixtures/comma_separated.txt' }) - 0.16) < EPSILON
def test_calculation_on_wikipedia_example_3(): assert ( abs( kappa.main({"--filename": "test/fixtures/wikipedia_example_3.txt"}) - 0.2593 ) < EPSILON )
def test_calculation_with_csvs(): assert ( abs( kappa.main( {"--csv": True, "--filename": "test/fixtures/comma_separated.txt"} ) - 0.16 ) < EPSILON )
def test_verbose_does_not_break(): assert ( abs( kappa.main( { "--verbose": True, "--csv": True, "--filename": "test/fixtures/comma_separated.txt", } ) - 0.16 ) < EPSILON )
def test_calculation_with_csvs(): assert abs( kappa.main({ '--csv': True, '--filename': 'test/fixtures/comma_separated.txt' }) - 0.16) < EPSILON
def test_calculation_on_perfect_agreement(): assert abs( kappa.main({'--filename': 'test/fixtures/perfect_agreement.txt'}) - 1.0) < EPSILON
def test_calculation_on_wikipedia_example_3(): assert abs( kappa.main({'--filename': 'test/fixtures/wikipedia_example_3.txt'}) - 0.2593) < EPSILON
def test_all_zeroes_does_not_break(): assert abs(kappa.main({'--filename': 'test/fixtures/all_zeroes.txt'}) - 1.0) < EPSILON
def test_verbose_does_not_break(): assert abs(kappa.main({'--verbose': True, '--csv': True, '--filename': 'test/fixtures/comma_separated.txt'}) - 0.16) < EPSILON
def test_calculation_with_csvs(): assert abs(kappa.main({'--csv': True, '--filename': 'test/fixtures/comma_separated.txt'}) - 0.16) < EPSILON
def test_calculation_on_perfect_agreement(): assert ( abs(kappa.main({"--filename": "test/fixtures/perfect_agreement.txt"}) - 1.0) < EPSILON )
def test_calculation_on_wikipedia_example_3(): assert abs(kappa.main({'--filename': 'test/fixtures/wikipedia_example_3.txt'}) - 0.2593) < EPSILON
def test_bad_input_exits(): with pytest.raises(IndexError): kappa.main({"--filename": "test/fixtures/invalid_data.txt"}) with pytest.raises(SystemExit): kappa.main({"--filename": "test/fixtures/missing_data.txt"})
def test_bad_filenames_exit(): with pytest.raises(SystemExit): kappa.main({"--filename": "does_not_exist.txt"})
def test_all_zeroes_does_not_break(): assert ( abs(kappa.main({"--filename": "test/fixtures/all_zeroes.txt"}) - 1.0) < EPSILON )
def test_all_zeroes_does_not_break(): assert abs( kappa.main({'--filename': 'test/fixtures/all_zeroes.txt'}) - 1.0) < EPSILON
def test_calculation_on_perfect_agreement(): assert abs(kappa.main({'--filename': 'test/fixtures/perfect_agreement.txt'}) - 1.0) < EPSILON