#NEWLINE# def test_init( ) : #NEWLINE# #INDENT# slt = SortedListWithKey ( key = modulo ) #NEWLINE# slt . _check ( ) #NEWLINE# slt = SortedListWithKey ( load = 10000 , key = modulo ) #NEWLINE# assert ( slt . _load == 10000 ) #NEWLINE# assert ( slt . _twice == 20000 ) #NEWLINE# assert ( slt . _half == 5000 ) #NEWLINE# slt . _check ( ) #NEWLINE# slt = SortedListWithKey ( range ( 10000 ) , key = modulo ) #NEWLINE# assert all ( ( ( tup [ 0 ] == tup [ 1 ] ) for tup in zip ( slt , sorted ( range ( 10000 ) , key = modulo ) ) ) ) #NEWLINE# slt . clear ( ) #NEWLINE# assert ( slt . _len == 0 ) #NEWLINE# assert ( slt . _maxes == [ ] ) #NEWLINE# assert ( slt . _lists == [ ] ) #NEWLINE# assert isinstance ( slt , SortedList ) #NEWLINE# assert isinstance ( slt , SortedListWithKey ) #NEWLINE# slt . _check ( )