Cursor context manager test