From 6b78abb1e2a06b4589c900909b1577d9cd8c29aa Mon Sep 17 00:00:00 2001 From: Paul Gesel Date: Fri, 22 Mar 2024 13:13:59 -0700 Subject: [PATCH] use __debug__ Signed-off-by: Paul Gesel --- .../generate_parameter_library_py/test/YAML_parse_error_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py b/generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py index aad425c..56b9b4d 100644 --- a/generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py +++ b/generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py @@ -81,7 +81,7 @@ def set_up(yaml_test_file): ], ) def test_expected(test_input, expected): - if sys.flags.optimize: + if not __debug__ or sys.flags.optimize: if test_input == 'wrong_default_type.yaml': pytest.skip( 'Evaluating optimized type validation cannot be completed when python is optimized'