a
    7Ub                     @   sP   d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 G d	d
 d
eZ
dS )zTests for notebook.py    N   )ExportersTestsBase   )NotebookExporter)validate)assert_big_text_equalc                   @   s,   e Zd ZdZeZdd Zdd Zdd ZdS )	TestNotebookExporterz'Contains test functions for notebook.pyc                 C   sh   t |  }| }W d   n1 s*0    Y  |  |  \}}t|dksZJ t|| dS )zF
        Does the NotebookExporter return the file unchanged?
        Nr   )open_get_notebookreadexporter_classfrom_filenamelenr   )selffZfile_contentsoutput	resources r   Flib/python3.9/site-packages/nbconvert/exporters/tests/test_notebook.pytest_export   s
    &z TestNotebookExporter.test_exportc                 C   s4   | j dd}||  \}}t|}t| d S )N   Znbformat_version)r   r   r
   jsonloadsr   r   Zexporterr   r   Znbr   r   r   test_downgrade_3   s    
z%TestNotebookExporter.test_downgrade_3c                 C   s<   | j dd}||  \}}t|}| |d d d S )Nr   r   nbformat)r   r   r
   r   r   ZassertEqualr   r   r   r   test_downgrade_2#   s    
z%TestNotebookExporter.test_downgrade_2N)	__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r   r      s
   
r   )r!   r   baser   Znotebookr   r   r   Znbconvert.tests.baser   r   r   r   r   r   <module>   s   