<s> import itertools <EOL> import types <EOL> from python_toolbox import nifty_collections <EOL> from python_toolbox . cute_iter_tools import fill <EOL> def test ( ) : <EOL> assert fill ( range ( <NUM_LIT:4> ) , fill_value = '<STR_LIT>' , length = <NUM_LIT:7> , sequence_type = list ) == [ <EOL> <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' <EOL> ] <EOL> assert isinstance ( fill ( range ( <NUM_LIT:4> ) , fill_value = '<STR_LIT>' ) , types . GeneratorType ) <EOL> assert fill ( range ( <NUM_LIT:4> ) , fill_value_maker = iter ( range ( <NUM_LIT:10> ) ) . next , length = <NUM_LIT:7> , <EOL> sequence_type = tuple ) == ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> lazy_tuple = fill ( range ( <NUM_LIT:4> ) , fill_value = '<STR_LIT>' , length = <NUM_LIT:7> , lazy_tuple = True ) <EOL> assert isinstance ( lazy_tuple , nifty_collections . LazyTuple ) <EOL> assert not lazy_tuple . collected_data <EOL> assert lazy_tuple == ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) </s>
