diff --git a/vizro-core/tests/unit/vizro/models/test_base.py b/vizro-core/tests/unit/vizro/models/test_base.py index a11bb7adc..763bfe5e6 100644 --- a/vizro-core/tests/unit/vizro/models/test_base.py +++ b/vizro-core/tests/unit/vizro/models/test_base.py @@ -308,7 +308,7 @@ def chart_dynamic(data_frame, hover_data: Optional[list[str]] = None): ) result = {} - exec(function_string, locals=result) + exec(function_string, globals(), result) return result["chart_dynamic"]