code: def test_errors(self):
      # detections / annotations must not be None
      with self.assertRaises(TypeError):
          onset_evaluation(None, ANNOTATIONS)
      with self.assertRaises(TypeError):
          onset_evaluation(DETECTIONS, None)
      # tolerance must be > 0
      with self.assertRaises(ValueError):
          onset_evaluation(DETECTIONS, ANNOTATIONS, 0)
      # tolerance must be correct type
      with self.assertRaises(TypeError):
          onset_evaluation(DETECTIONS, ANNOTATIONS, None)
      with self.assertRaises(TypeError):
          onset_evaluation(DETECTIONS, ANNOTATIONS, [])
      with self.assertRaises(TypeError):
          onset_evaluation(DETECTIONS, ANNOTATIONS, {})
  
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 1 for calling the TestOnsetEvaluationFunction obj's underlying member method code with example usage: obj.test_errors() without return types