diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-12 09:05:15 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-12 09:11:19 +0300 |
commit | ae6a4fcc7a707e419463c47e191afe54def26764 (patch) | |
tree | 35733066bddf441c945c3961ece4075b4b24229e /tests/python/CMakeLists.txt | |
parent | 00c7e760b323e5fa46703d0e4769c8f1d9c35f2e (diff) |
Tests: add test to ensure restricted py-driver execution is working
Add internal function (only used for testing at the moment)
`_bpy._driver_secure_code_test`.
Add test `script_pyapi_bpy_driver_secure_eval` to serves two purposes:
- Ensure expressions that should be insecure remain so when upgrading
Python or making any changes in this area.
- Ensure new versions of Python don't introduce new byte-codes that
prevent existing expressions from being executed
(happened when upgrading from 3.7, see [0]).
[0]: dfa52017638abdf59791e5588c439d3a558a191d
Diffstat (limited to 'tests/python/CMakeLists.txt')
-rw-r--r-- | tests/python/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 38c3fc4389a..d95f2cd2644 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -102,6 +102,11 @@ add_blender_test( ) add_blender_test( + script_pyapi_bpy_driver_secure_eval + --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_driver_secure_eval.py +) + +add_blender_test( script_pyapi_idprop --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_idprop.py ) |