示例#1
0
 def test_yesno(self):
     dataset = YESNO(self.root_dir)
     samples = list(dataset)
     samples.sort(key=lambda s: s[2])
     for i, (waveform, sample_rate, label) in enumerate(samples):
         expected_label = self.labels[i]
         expected_data = self.data[i]
         self.assertEqual(expected_data, waveform, atol=5e-5, rtol=1e-8)
         assert sample_rate == 8000
         assert label == expected_label
示例#2
0
 def test_yesno(self):
     data = YESNO(self.path)
     data[0]
示例#3
0
 def test_yesno(self):
     data = YESNO(self.path, return_dict=True)
     data[0]