fix test.
This commit is contained in:
@@ -522,11 +522,10 @@ class TestAICFilter(unittest.IsolatedAsyncioTestCase):
|
|||||||
|
|
||||||
self.assertEqual(unsupported_ctx.enhancement_attempts, 1)
|
self.assertEqual(unsupported_ctx.enhancement_attempts, 1)
|
||||||
|
|
||||||
async def test_process_frame_disable_sets_enhancement_to_zero(self):
|
async def test_process_frame_disable_sets_bypass(self):
|
||||||
"""Test disable frame sets enhancement level to 0.0."""
|
"""Test disable frame toggles bypass."""
|
||||||
filter_instance = self._create_filter_with_mocks(enhancement_level=0.7)
|
filter_instance = self._create_filter_with_mocks(enhancement_level=0.7)
|
||||||
await self._start_filter_with_mocks(filter_instance)
|
await self._start_filter_with_mocks(filter_instance)
|
||||||
|
|
||||||
await filter_instance.process_frame(self.FilterEnableFrame(enable=False))
|
await filter_instance.process_frame(self.FilterEnableFrame(enable=False))
|
||||||
|
|
||||||
enhancement_params = [
|
enhancement_params = [
|
||||||
@@ -539,8 +538,9 @@ class TestAICFilter(unittest.IsolatedAsyncioTestCase):
|
|||||||
for p, v in self.mock_processor.processor_ctx.parameters_set
|
for p, v in self.mock_processor.processor_ctx.parameters_set
|
||||||
if p == aic_sdk.ProcessorParameter.Bypass
|
if p == aic_sdk.ProcessorParameter.Bypass
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assertTrue(filter_instance._bypass)
|
self.assertTrue(filter_instance._bypass)
|
||||||
self.assertEqual(enhancement_params[-1][1], 0.0)
|
self.assertEqual(enhancement_params[-1][1], 0.7)
|
||||||
self.assertEqual(bypass_params[-1][1], 1.0)
|
self.assertEqual(bypass_params[-1][1], 1.0)
|
||||||
|
|
||||||
async def test_process_frame_enable_restores_configured_enhancement(self):
|
async def test_process_frame_enable_restores_configured_enhancement(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user