class_docstr: Test analyzer with default parameters
class_docstr_tok: ["Test","analyzer","with","default","parameters"]
docstr: Internal function that test if there is NaN in the results
  of a given analyzer
docstr_tok: ["Internal","function","that","test","if","there","is","NaN","in","the","results","of","a","given","analyzer"]
code: def _perform_test(self, analyzer_cls, source_file):
      """Internal function that test if there is NaN in the results
      of a given analyzer"""
      decoder = FileDecoder(source_file)
      analyzer = analyzer_cls()
      pipe = decoder | analyzer
      pipe.run()
      for result in analyzer.results.values():
          if "value" in result.data_object.keys():
              # Test for NaN
              self.assertFalse(
                  np.any(np.isnan(result.data)),
                  "NaN in %s data value" % result.name,
              )
              # Test for Inf
              self.assertFalse(
                  np.any(np.isinf(result.data)),
                  "Inf in %s data value" % result.name,
              )
      # Try to serialize as hdf5
      h5_file = tempfile.NamedTemporaryFile(suffix=".h5", delete=True)
      analyzer.results.to_hdf5(h5_file.name)
  
file_path: TimeSide/tests/test_analyzers_default.py
imports: import unittest
  from unit_timeside import TestRunner
  import numpy
  import timeside.core
  from timeside.plugins.decoder.aubio import AubioDecoder
  from timeside.core.tools.test_samples import samples
  from jsonschema import Draft4Validator
  import tempfile
label_desc: Use image node_id 1 for calling the TestAnalyzers_with_default obj's underlying member method code with example usage: obj._perform_test(analyzer_cls, source_file) without return types