def test_clear(): stack = BefungeStack() stack.push(1) assert len(stack) == 1 stack.clear() assert len(stack) == 0