From ac11baa0c4bad90af18695f1e72ff5f487b3f867 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 10 Nov 2025 14:06:43 +0500 Subject: [PATCH] Fix `the_object_name_does_not_exist` not checking for errors `assert True` was introduced in 1c1035e and original implementation with `assert False` was removed in b0d8101 --- src/bonsai/test/bim/test_feature.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bonsai/test/bim/test_feature.py b/src/bonsai/test/bim/test_feature.py index 7ac29a3614..28b910b3cb 100644 --- a/src/bonsai/test/bim/test_feature.py +++ b/src/bonsai/test/bim/test_feature.py @@ -1015,11 +1015,9 @@ def the_object_name_exists(name: str) -> bpy.types.Object: @then(parsers.parse('the object "{name}" does not exist')) -def the_object_name_does_not_exist(name) -> bpy.types.Object: +def the_object_name_does_not_exist(name) -> None: obj = bpy.data.objects.get(name) - if not obj: - assert True, f'The object "{name}" exists' - return obj + assert obj is None, f'The object "{name}" exists' @given(parsers.parse('the collection "{name}" exists'))