o
    8Va                     @   s`   d Z ddlmZmZmZ ddlmZmZmZ ddl	m
Z
 e
dddZes&dZd	d
 Zdd ZdS )z<Tests of tools for setting up interactive IPython sessions.     )init_ipython_sessionenable_automatic_symbols"enable_automatic_int_sympification)SymbolRationalInteger)import_moduleZIPythonz0.11)Zmin_module_versionTc                  C   s   t  } | d t|  d}|| jvsJ | d| d || jvs$J | d| d | jd tks5J | d||f d || jv sFJ | dd d	| jvsSJ | jd du s\J | d
 | dd | jd du spJ d S )Nzfrom sympy import *Zverylongsymbolnameza = %sTza = type(%s)az%s = Symbol('%s')za = all == __builtin__.allallzimport sympyz a = factorial == sympy.factorial)r   run_cellr   user_nsr   )appsymbol r   F/usr/lib/python3/dist-packages/sympy/interactive/tests/test_ipython.pytest_automatic_symbols   s"   

r   c                  C   s   t  } | d | d t| jd tsJ t|  | d t| jd ts*J | d t| jd ts9J | d t| jd tsHJ | d | jd tddksYJ d S )	Nzfrom sympy import Integerza = 1r	   za = 1/2z
a = int(1)z
a = (1/
2)      )r   r   
isinstancer   intr   r   r   )r   r   r   r   test_int_to_Integer9   s   





r   N)__doc__Zsympy.interactive.sessionr   r   r   Z
sympy.corer   r   r   Zsympy.externalr   ZipythonZdisabledr   r   r   r   r   r   <module>   s    
