#NEWLINE# def test_naturals( ) : #NEWLINE# #INDENT# N = S . Naturals #NEWLINE# assert ( 5 in N ) #NEWLINE# assert ( ( - 5 ) not in N ) #NEWLINE# assert ( 5.5 not in N ) #NEWLINE# ni = iter ( N ) #NEWLINE# ( a , b , c , d ) = ( next ( ni ) , next ( ni ) , next ( ni ) , next ( ni ) ) #NEWLINE# assert ( ( a , b , c , d ) == ( 1 , 2 , 3 , 4 ) ) #NEWLINE# assert isinstance ( a , Basic ) #NEWLINE# assert ( N . intersect ( Interval ( ( - 5 ) , 5 ) ) == Range ( 1 , 6 ) ) #NEWLINE# assert ( N . intersect ( Interval ( ( - 5 ) , 5 , True , True ) ) == Range ( 1 , 5 ) ) #NEWLINE# assert ( N . boundary == ni ) #NEWLINE# assert ( N . inf == 1 ) #NEWLINE# assert ( N . sup == oo )