code: def testValidityCheck(self):
      from numpy import nan as NaN
      from numpy import inf as infinity
  
      p = Pool()
      self.assertRaises(EssentiaException, p.add, "foo", NaN, True)
      self.assertRaises(EssentiaException, p.add, "foo", infinity, True)
      p.add("foo", 1, True)
      p.add("foo", NaN, False)
      p.add("foo", infinity, False)
      self.assertEqualVector(p.descriptorNames(), ["foo"])
      self.assertEqual(len(p["foo"]), 3)
  
imports: from essentia_test import *
label_desc: Use image node_id 31 for calling the TestPool obj's underlying member method code with example usage: obj.testValidityCheck() without return types