code: def test_duration(self, p):
      total_frames = 0
      f = source(p)
      duration = f.duration
      while True:
          _, read = f()
          total_frames += read
          if read < f.hop_size:
              break
      assert_equal(duration, total_frames)
  
imports: from numpy.testing import TestCase, assert_equal
  from aubio import source
  from utils import list_all_sounds, parse_file_samplerate
  import unittest
  from _tools import assert_raises, assert_equal, assert_warns
  from _tools import parametrize, skipTest
label_desc: Use image node_id 7 for calling the Test_aubio_source_read obj's underlying member method code with example usage: obj.test_duration(p) without return types