MCPcopy Create free account
hub / github.com/Netflix/vmaf / test_read_dataset

Method test_read_dataset

python/test/routine_test.py:23–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21class TestReadDataset(unittest.TestCase):
22
23 def test_read_dataset(self):
24 train_dataset_path = VmafConfig.test_resource_path('test_image_dataset_diffdim.py')
25 train_dataset = import_python_file(train_dataset_path)
26 train_assets = read_dataset(train_dataset)
27
28 self.assertEqual(len(train_assets), 9)
29 self.assertTrue('groundtruth' in train_assets[0].asset_dict.keys())
30 self.assertTrue('os' not in train_assets[0].asset_dict.keys())
31 self.assertFalse('width' in train_assets[0].asset_dict.keys())
32 self.assertTrue('ref_width' in train_assets[0].asset_dict.keys())
33 self.assertTrue('dis_width' in train_assets[0].asset_dict.keys())
34 self.assertFalse('height' in train_assets[0].asset_dict.keys())
35 self.assertTrue('ref_height' in train_assets[0].asset_dict.keys())
36 self.assertTrue('dis_height' in train_assets[0].asset_dict.keys())
37 self.assertTrue('quality_width' not in train_assets[0].asset_dict.keys())
38 self.assertTrue('quality_height' not in train_assets[0].asset_dict.keys())
39
40 def test_read_dataset_qualitywh(self):
41 train_dataset_path = VmafConfig.test_resource_path('test_image_dataset_diffdim_qualitywh.py')

Callers

nothing calls this directly

Calls 5

import_python_fileFunction · 0.90
read_datasetFunction · 0.90
test_resource_pathMethod · 0.80
assertEqualMethod · 0.80
assertTrueMethod · 0.80

Tested by

no test coverage detected