
    MZd                     L    d dl mZ d dlmZ d dlmZ d dlmZ d Zd Z	d Z
d Zy	)
    )CodePrinter)symbols)Dummy)raisesc                  Z    t        |       }t               |_        t               |_        |S )N)settings)r   set_not_supported_number_symbols)kwargsps     G/usr/lib/python3/dist-packages/sympy/printing/tests/test_codeprinter.pysetup_test_printerr      s%    V$AuAAH    c                  t    t        d      } t               }|j                  |       d| j                  z  k(  sJ y )Ndzd_%i)r   r   _print_Dummydummy_index)r   r   s     r   test_print_Dummyr      s3    c
AA>>! 6666r   c                  &   t        d      \  } }t               }|j                  |       dk(  sJ |j                  |      dk(  sJ |j                  j	                  dg       |j                  |      dk(  sJ t        d      }|j                  j	                  dg       t        t              5  |j                  |       d d d        t        d      }|j                  j	                  dg       |j                  |      d	k(  sJ y # 1 sw Y   HxY w)
Nzx, ifxifif_T)error_on_reserved_He_Man)reserved_word_suffix	if_He_Man)r   r   _printreserved_wordsupdater   
ValueError)r   yr   s      r   test_print_Symbolr#      s    7DAqA88A;#88A;$TF#88A;%T2ATF#	
	 	 		:ATF#88A;+%%% s   .DDc                  4    G d dt               } ddlm}m}  |        }t	        t
              5  |j                   |ddi              d d d        t	        t
              5  |j                   |ddi              d d d        y # 1 sw Y   ;xY w# 1 sw Y   y xY w)Nc                       e Zd Zd Zy)-test_issue_15791.<locals>.CrashingCodePrinterc                     t         )N)NotImplementedError)selfobjs     r   emptyPrinterz:test_issue_15791.<locals>.CrashingCodePrinter.emptyPrinter)   s    %%r   N)__name__
__module____qualname__r+    r   r   CrashingCodePrinterr&   (   s    	&r   r0   r   )MutableSparseMatrixImmutableSparseMatrix   )r   sympy.matricesr1   r2   r   r(   doprint)r0   r1   r2   cs       r   test_issue_15791r7   '   s    &k &
 	A 
#	$ 3			'1b123	#	$ 1			%aB/01 13 31 1s   BBBBN)sympy.printing.codeprinterr   
sympy.corer   sympy.core.symbolr   sympy.testing.pytestr   r   r   r#   r7   r/   r   r   <module>r<      s%    2  # '7
&(1r   