def test_sp2():
 sp = SequencePattern('sorted', in_seq_len=20, out_seq_len=5)
 x = np.random.randint(0, 9, 20)
 y = sp.generate_output_sequence(x)
 assert (len(y) == 5)
 y_exp = sorted(x)[:5]
 assert all((y == y_exp))

def test_sp2 ( ) : sp = SequencePattern ( 'sorted' , in_seq_len = 20 , out_seq_len = 5 ) x = np . random . randint ( 0 , 9 , 20 ) y = sp . generate_output_sequence ( x ) assert ( len ( y ) == 5 ) y_exp = sorted ( x ) [ : 5 ] assert all ( ( y == y_exp ) )
test two sequencepattern instance with lengths different from default .