<s> from python_toolbox . math_tools import ( infinity , PossiblyInfiniteIntegral , <EOL> PossiblyInfiniteReal ) <EOL> def test_possibly_infinite_integral ( ) : <EOL> matches = [ <NUM_LIT:0> , <NUM_LIT:1> , - <NUM_LIT:100> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> ** <NUM_LIT:1000> , infinity , - infinity , <EOL> True , False ] <EOL> non_matches = [ <NUM_LIT> , <NUM_LIT> , - <NUM_LIT> , None , '<STR_LIT>' , ( <NUM_LIT:1> , <NUM_LIT:2> ) ] <EOL> for match in matches : <EOL> assert isinstance ( match , PossiblyInfiniteIntegral ) <EOL> for non_match in non_matches : <EOL> assert not isinstance ( non_match , PossiblyInfiniteIntegral ) <EOL> def test_possibly_infinite_real ( ) : <EOL> matches = [ <NUM_LIT:0> , <NUM_LIT:1> , - <NUM_LIT:100> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:10> ** <NUM_LIT:1000> , infinity , - infinity , <EOL> <NUM_LIT> , <NUM_LIT> , - <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , True , False ] <EOL> non_matches = [ <NUM_LIT> , None , '<STR_LIT>' , ( <NUM_LIT:1> , <NUM_LIT:2> ) ] <EOL> for match in matches : <EOL> assert isinstance ( match , PossiblyInfiniteReal ) <EOL> for non_match in non_matches : <EOL> assert not isinstance ( non_match , PossiblyInfiniteReal ) </s>
