<s> import unittest <EOL> import numpy as np <EOL> from libact . base . dataset import Dataset <EOL> from libact . labelers import IdealLabeler <EOL> class TestDatasetMethods ( unittest . TestCase ) : <EOL> initial_X = np . arange ( <NUM_LIT:15> ) . reshape ( ( <NUM_LIT:5> , <NUM_LIT:3> ) ) <EOL> initial_y = np . array ( [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:1> , <NUM_LIT:4> ] ) <EOL> def setup_dataset ( self ) : <EOL> return Dataset ( self . initial_X , self . initial_y ) <EOL> def test_label ( self ) : <EOL> dataset = self . setup_dataset ( ) <EOL> lbr = IdealLabeler ( dataset ) <EOL> ask_id = lbr . label ( np . array ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> ] ) ) <EOL> self . assertEqual ( ask_id , <NUM_LIT:1> ) <EOL> ask_id = lbr . label ( np . array ( [ <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:8> ] ) ) <EOL> self . assertEqual ( ask_id , <NUM_LIT:3> ) <EOL> ask_id = lbr . label ( [ <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT> ] ) <EOL> self . assertEqual ( ask_id , <NUM_LIT:4> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
