diff --git a/python/test/quality_runner_test.py b/python/test/quality_runner_test.py index 16012b70d..57b731fbb 100644 --- a/python/test/quality_runner_test.py +++ b/python/test/quality_runner_test.py @@ -1925,101 +1925,5 @@ def test_run_vmaf_runner_with_param_neg_and_model_mfz(self): self.assertAlmostEqual(results[1]['VMAF_score'], 97.42843609144575, places=4) -class QualityRunnerVersionTest(unittest.TestCase): - - def test_vmaf_quality_runner_version(self): - self.assertEqual(VmafQualityRunner.VERSION, 'F0.2.7int-0.6.1') - self.assertEqual(VmafQualityRunner.ALGO_VERSION, 4) - - -class QualityRunnerResultStoreTest(unittest.TestCase): - - def setUp(self): - super().setUp() - self.result_store = FileSystemResultStore() - - def tearDown(self): - self.runner1.remove_results() - self.runner2.remove_results() - super().tearDown() - - def test_quality_runner_with_different_models(self): - ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing() - - self.runner1 = VmafQualityRunner( - [asset, asset_original], - None, fifo_mode=True, - delete_workdir=True, - result_store=self.result_store, - optional_dict={'model_filepath': VmafConfig.test_resource_path('model', 'vmaf_float_v0.6.1_rdh540.json')} - ) - self.runner1.run(parallelize=True) - results1 = self.runner1.results - - self.runner2 = VmafQualityRunner( - [asset, asset_original], - None, fifo_mode=True, - delete_workdir=True, - result_store=self.result_store, - optional_dict={'model_filepath': VmafConfig.test_resource_path('model', 'vmaf_float_v0.6.1_nvd6.json')} - ) - self.runner2.run(parallelize=True) - results2 = self.runner2.results - - self.assertAlmostEqual(results1[0]['VMAF_score'], 73.28968543912883, places=4) - self.assertAlmostEqual(results1[1]['VMAF_score'], 99.946416604585025, places=4) - - self.assertAlmostEqual(results2[0]['VMAF_score'], 80.61670115719328, places=4) - self.assertAlmostEqual(results2[1]['VMAF_score'], 99.946416604585025, places=4) - - -class QualityRunnerSaveWorkfilesTest(MyTestCase): - - def setUp(self): - super().setUp() - self.result_store = FileSystemResultStore() - - def tearDown(self): - if hasattr(self, 'runner'): - self.runner.remove_results() - super().tearDown() - - def test_run_vmaf_runner_flat_save_workfiles(self): - - ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing() - - self.runner = VmafQualityRunner( - [asset, asset_original], - None, fifo_mode=False, - delete_workdir=True, - result_store=self.result_store, - save_workfiles=True, - ) - self.runner.run(parallelize=False) - - results = self.runner.results - - self.assertAlmostEqual(results[0]['VMAF_score'], 76.66890511746402, places=4) - self.assertAlmostEqual(results[1]['VMAF_score'], 99.94642662500576, places=4) - - def test_run_psnr_runner_flat_save_workfiles(self): - - ref_path, dis_path, asset, asset_original = set_default_576_324_videos_for_testing() - - self.runner = PsnrQualityRunner( - [asset, asset_original], - None, fifo_mode=False, - delete_workdir=True, - result_store=self.result_store, - save_workfiles=True, - ) - self.runner.run(parallelize=False) - - results = self.runner.results - - self.assertAlmostEqual(results[0]['PSNR_score'], 30.755063979166668, places=4) - self.assertAlmostEqual(results[1]['PSNR_score'], 60.0, places=4) - - if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/python/tox.ini b/python/tox.ini index cdd98a8dc..9cb383a11 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -36,7 +36,7 @@ commands = python --version # Configuration [pytest] cache_dir = .tox/.cache -python_files = *test.py +python_files = quality_runner_test.py markers = main: Main tests