#NEWLINE# @ unittest . expectedFailure #NEWLINE# def test_nrt_nested_gen_refct( self ) : #NEWLINE# #INDENT# def gen0( arr ) : #NEWLINE# #INDENT# ( yield arr ) #NEWLINE# #UNINDENT# def factory( gen0 ) : #NEWLINE# #INDENT# def gen1( arr ) : #NEWLINE# #INDENT# for out in gen0 ( arr ) : #NEWLINE# #INDENT# return out #NEWLINE# #UNINDENT# #UNINDENT# return gen1 #NEWLINE# #UNINDENT# py_arr = np . arange ( 10 ) #NEWLINE# c_arr = py_arr . copy ( ) #NEWLINE# py_old = factory ( gen0 ) ( py_arr ) #NEWLINE# c_gen = jit ( nopython = True ) ( factory ( jit ( nopython = True ) ( gen0 ) ) ) #NEWLINE# c_old = c_gen ( c_arr ) #NEWLINE# self . assertIsNot ( py_arr , c_arr ) #NEWLINE# self . assertIs ( py_old , py_arr ) #NEWLINE# self . assertIs ( c_old , c_arr ) #NEWLINE# self . assertEqual ( sys . getrefcount ( py_old ) , sys . getrefcount ( c_old ) )