<s> from combi . _python_toolbox import cute_testing <EOL> from combi import * <EOL> def test ( ) : <EOL> huge_perm_space = PermSpace ( range ( <NUM_LIT:100> ) ) <EOL> big_perm_space = PermSpace ( range ( <NUM_LIT> ) , fixed_map = { <NUM_LIT:1> : <NUM_LIT:5> , <NUM_LIT> : <NUM_LIT:3> , } , <EOL> degrees = ( <NUM_LIT:3> , <NUM_LIT:5> ) ) <EOL> product_space = ProductSpace ( ( huge_perm_space , big_perm_space ) ) <EOL> assert product_space . length == huge_perm_space . length * big_perm_space . length <EOL> ( perm_0 , perm_1 ) = product_space [ <NUM_LIT:10> ** <NUM_LIT:10> ] <EOL> assert perm_0 in huge_perm_space <EOL> assert perm_1 in big_perm_space <EOL> assert ( perm_0 , perm_1 ) in product_space <EOL> assert product_space . index ( ( perm_0 , perm_1 ) ) == <NUM_LIT:10> ** <NUM_LIT:10> <EOL> repr ( ~ perm_0 ) <EOL> repr ( ~ perm_1 ) <EOL> assert ( ~ perm_0 , ~ perm_1 ) in product_space <EOL> assert repr ( product_space ) == ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> assert product_space <EOL> assert not ProductSpace ( ( ( ) , ) ) <EOL> assert not ProductSpace ( ( ( ) , { } ) ) <EOL> with cute_testing . RaiseAssertor ( IndexError ) : <EOL> product_space [ product_space . length ] <EOL> with cute_testing . RaiseAssertor ( IndexError ) : <EOL> product_space [ product_space . length + <NUM_LIT:7> ] <EOL> with cute_testing . RaiseAssertor ( IndexError ) : <EOL> product_space [ - product_space . length - <NUM_LIT:1> ] <EOL> with cute_testing . RaiseAssertor ( IndexError ) : <EOL> product_space [ - product_space . length - <NUM_LIT:100> ] <EOL> assert { ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) , <EOL> ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) , <EOL> ProductSpace ( ( range ( <NUM_LIT:3> ) , range ( <NUM_LIT:4> ) ) ) } == { <EOL> ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) , <EOL> ProductSpace ( ( range ( <NUM_LIT:3> ) , range ( <NUM_LIT:4> ) ) ) <EOL> } <EOL> assert ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) == ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) <EOL> assert ProductSpace ( ( range ( <NUM_LIT:4> ) , range ( <NUM_LIT:3> ) ) ) != ProductSpace ( ( range ( <NUM_LIT:3> ) , range ( <NUM_LIT:4> ) ) ) </s>
