<s> '''<STR_LIT>''' <EOL> import unittest <EOL> from pyproct . data . handler . elementRange import ElementRange <EOL> from pyproct . data . handler . dataLoader import DataLoader <EOL> class FakeFileLoader ( DataLoader ) : <EOL> LOADER_TYPE = "<STR_LIT>" <EOL> def load_data_from_source ( self , data_source ) : <EOL> e_range = ElementRange ( data_source [ <NUM_LIT:0> ] , data_source [ <NUM_LIT:1> ] ) <EOL> return e_range , len ( e_range ) <EOL> def close ( self ) : <EOL> super ( FakeFileLoader , self ) . close ( ) <EOL> inflated_list = [ ] <EOL> [ inflated_list . extend ( list ( e_range ) ) for e_range in self . loaded_data ] <EOL> return inflated_list <EOL> class Test ( unittest . TestCase ) : <EOL> def test_all ( self ) : <EOL> ffl = FakeFileLoader ( None ) <EOL> self . assertTrue ( hasattr ( ffl , "<STR_LIT>" ) ) <EOL> with self . assertRaises ( SystemExit ) : <EOL> ffl . close ( ) <EOL> ffl . load ( ( <NUM_LIT:1> , <NUM_LIT:5> ) ) <EOL> e_range = ffl . load ( ( <NUM_LIT:6> , <NUM_LIT:9> ) ) <EOL> self . assertEqual ( [ <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:8> ] , list ( e_range ) ) <EOL> merged_data = ffl . close ( ) <EOL> self . assertEqual ( [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:8> , <NUM_LIT:9> ] , merged_data ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
