Skip to content

Commit b1ae816

Browse files
committed
tests(hooks): update for set_hooks_bulk -> set_hooks rename
why: Tests need to match the renamed API method what: - Update all set_hooks_bulk calls to set_hooks - Update comments referencing set_hooks_bulk Squash target: ec340de (tests: bulk operations test grid)
1 parent 6fd1750 commit b1ae816

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_hooks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class BulkOpTestCase(t.NamedTuple):
590590
),
591591
]
592592

593-
# --- set_hooks_bulk tests ---
593+
# --- set_hooks tests ---
594594
SET_BULK_TESTS: list[BulkOpTestCase] = [
595595
BulkOpTestCase(
596596
"set_bulk_with_dict",
@@ -692,7 +692,7 @@ def test_bulk_hook_operation(server: Server, test_case: BulkOpTestCase) -> None:
692692
This parametrized test ensures all bulk operations work correctly:
693693
- get_hook_indices: returns sorted list of existing indices
694694
- get_hook_values: returns SparseArray with values
695-
- set_hooks_bulk: sets multiple hooks at once
695+
- set_hooks: sets multiple hooks at once
696696
- clear_hook: removes all indexed values
697697
- append_hook: appends at next available index
698698
"""
@@ -716,7 +716,7 @@ def test_bulk_hook_operation(server: Server, test_case: BulkOpTestCase) -> None:
716716
assert any(expected_str in v for v in values.values())
717717

718718
elif test_case.operation == "set_bulk":
719-
session.set_hooks_bulk(test_case.hook, **test_case.operation_args)
719+
session.set_hooks(test_case.hook, **test_case.operation_args)
720720
indices = session.get_hook_indices(test_case.hook)
721721
assert indices == test_case.expected_indices
722722
if test_case.expected_contains:
@@ -765,14 +765,14 @@ def test_bulk_hook_values_iteration(server: Server) -> None:
765765

766766

767767
def test_bulk_hook_set_with_sparse_array(server: Server) -> None:
768-
"""Test set_hooks_bulk with SparseArray input."""
768+
"""Test set_hooks with SparseArray input."""
769769
session = server.new_session(session_name="test_bulk_ops")
770770

771771
sparse: SparseArray[str] = SparseArray()
772772
sparse.add(0, "display-message 'from sparse 0'")
773773
sparse.add(10, "display-message 'from sparse 10'")
774774

775-
session.set_hooks_bulk("session-renamed", sparse)
775+
session.set_hooks("session-renamed", sparse)
776776

777777
indices = session.get_hook_indices("session-renamed")
778778
assert indices == [0, 10]
@@ -787,7 +787,7 @@ def test_bulk_hook_method_chaining(server: Server) -> None:
787787

788788
# Chain operations
789789
result = (
790-
session.set_hooks_bulk(
790+
session.set_hooks(
791791
"session-renamed",
792792
["display-message 'hook 0'"],
793793
)

0 commit comments

Comments
 (0)