
    -PhG                     6    d Z ddlmZ ddlmZmZmZ d Zd ZdS )zTest utility functions.    )Path)_combine_backreferences
_read_json_write_jsonc                      ddgddgd} t          i |           | k    sJ ddgdd	gd
}t          | |          g dddgdd	gdk    sJ dS )z2Check `_combine_backreferences` works as expected.            )ab            )r   c)r   r	   r   r   )r   r   r   N)r   )
backrefs_a
backrefs_bs     _/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx_gallery/tests/test_utils.pytest_combine_backreferencesr      s     V"X J #2z22j@@@@ V"X J #:z::\\"X"X? ?          c                    t          | d          }ddd}t          ||d           t          t          |                              |j        dz                       d |                                D             k    sJ dS )	z6Check `_read_json` and `_write_json` work as expected.test)zpath/file.pyzfirst introzfirst title)zpath2/file2.pyzsecond introzsecond title)object1object2	test_dictztest_dict.jsonc                 4    i | ]\  }}|t          |          S  )list).0keyvalues      r   
<dictcomp>z(test_read_write_json.<locals>.<dictcomp>$   s7     N N N'S%T%[[N N Nr   N)r   r   r   	with_namestemitems)tmpdirpathdatas      r   test_read_write_jsonr*      s    DAE D dK(((d4jj**497G+GHHII N N+/::<<N N N      r   N)	__doc__pathlibr   sphinx_gallery.utilsr   r   r   r   r*   r   r   r   <module>r.      sc            Q Q Q Q Q Q Q Q Q Q  &    r   