Skip to content

Commit

Permalink
Test dynamic increase of stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
smknaake committed Oct 3, 2024
1 parent 6b0f84c commit f509619
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ def test_push():
assert np.array_equal(stack, [0, 1, 2])


def test_push_size_increases():
size = 0
stack = np.empty(1)
size_before = stack.size
stack, size = ut.push(stack, 0, size)
stack, size = ut.push(stack, 1, size)
assert stack.size == 2
assert size_before < stack.size


def test_copy():
dst = np.zeros(5)
src = np.arange(5)
Expand Down

0 comments on commit f509619

Please sign in to comment.