code: def test_results(self):
      # default window
      tp, fp, tn, fn, errors = onset_evaluation(DETECTIONS, ANNOTATIONS)
      self.assertTrue(
          np.allclose(tp, [0.999999, 1.029999, 2.01, 2.02, 2.5])
      )
      self.assertTrue(np.allclose(fp, [1.45, 3.025000001]))
      self.assertTrue(np.allclose(tn, []))
      self.assertTrue(np.allclose(fn, [1.5, 2.05, 3.0]))
      self.assertTrue(
          np.allclose(errors, [-0.00000001, 0.00999999, 0.01, -0.01, 0])
      )
      # window = 0.01
      tp, fp, tn, fn, errors = onset_evaluation(
          DETECTIONS, ANNOTATIONS, window=0.01
      )
      self.assertTrue(
          np.allclose(tp, [0.999999, 1.029999, 2.01, 2.02, 2.5])
      )
      self.assertTrue(np.allclose(fp, [1.45, 3.025000001]))
      self.assertTrue(np.allclose(tn, []))
      self.assertTrue(np.allclose(fn, [1.5, 2.05, 3.0]))
      self.assertTrue(
          np.allclose(errors, [-0.00000001, 0.00999999, 0.01, -0.01, 0])
      )
      # window = 0.04
      tp, fp, tn, fn, errors = onset_evaluation(
          DETECTIONS, ANNOTATIONS, window=0.04
      )
      self.assertTrue(
          np.allclose(
              tp, [0.999999, 1.029999, 2.01, 2.02, 2.5, 3.025000001]
          )
      )
      self.assertTrue(np.allclose(fp, [1.45]))
      self.assertTrue(np.allclose(tn, []))
      self.assertTrue(np.allclose(fn, [1.5, 2.05]))
      self.assertTrue(
          np.allclose(
              errors, [-0.00000001, 0.00999999, 0.01, -0.01, 0, 0.025]
          )
      )
  
imports: from __future__ import absolute_import, division, print_function
  import math
  import unittest
  from madmom.evaluation.onsets import *
  from .None import ANNOTATIONS_PATH, DETECTIONS_PATH
label_desc: Use image node_id 2 for calling the TestOnsetEvaluationFunction obj's underlying member method code with example usage: obj.test_results() without return types