o
    i
                     @   s@   d Z ddlmZ ddlmZ ddlmZmZ dd Zdd	 Z	d
S )z/Test saving a notebook with escaped characters
    )E)quote   )EDITOR_PAGE	TREE_PAGEc                 C   s^   d}d}|s%|dk r%| j dtd }|d |krd}|d7 }|s%|dk s
|d |ks-J d S )	NFr      z#notebook_namepagez.ipynbTr   )locater   get_inner_text)nbnbnamedisplay_updatedcount_checkdisplayed_name r   _/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/nbclassic/tests/end_to_end/test_save.pycheck_display_name	   s   r   c                 C   s  d}t |}| jddd d| d}| j|td | jdtd}|d	 |ks)J | jd
td}||ks6J | jdtd}||ksCJ t| | | jdtd | jdtd}t|dks^J | jdtd | jdtd g }| jdtd}	|	D ]'}
|
	d}||v r|
d}| jt|d d | jdtd  n|| qwt|d|| jd
td}||ksJ | jddd |   d S )Nu'   has#hash and space and unicø∂e.ipynbr   zs = '??')indexcontentz*() => Jupyter.notebook.set_notebook_name('z')r   z&() => Jupyter.notebook.save_notebook()namez$() => Jupyter.notebook.notebook_namez$() => Jupyter.notebook.notebook_pathz(() => Jupyter.notebook.save_checkpoint()z"() => Jupyter.notebook.checkpointsr   z#ipython_notebookz
.item_linkza.item_linkhrefz/a@b/)r	   partial_urlz.cellz not found in  )r   	edit_cellevaluater   r   lentry_click_selectorwait_for_selector
locate_allget_attributesplitnavigate_toappendAssertionErrordelete_all_cells)notebook_frontendr   escaped_nameset_nb_namemodelcurrent_namecurrent_pathcheckpointshrefs_nonmatch	all_linkslinkr   r   r   r   	test_save   s@   


r0   N)
__doc__tkinterr   urllib.parser   utilsr   r   r   r0   r   r   r   r   <module>   s    