<s> import unittest <EOL> import numpy as np <EOL> from openmdao . main . api import Container <EOL> from openmdao . main . datatypes . list import List <EOL> class ListTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> self . hobj = Container ( ) <EOL> self . hobj . add ( '<STR_LIT>' , List ( iotype = '<STR_LIT>' ) ) <EOL> def tearDown ( self ) : <EOL> """<STR_LIT>""" <EOL> self . hobj = None <EOL> def test_assignment ( self ) : <EOL> self . hobj . list1 = range ( <NUM_LIT:5> ) <EOL> self . hobj . list1 = xrange ( <NUM_LIT:5> ) <EOL> self . hobj . list1 = ( x for x in xrange ( <NUM_LIT:5> ) ) <EOL> self . hobj . list1 = np . zeros ( <NUM_LIT:2> ) <EOL> def test_get ( self ) : <EOL> self . hobj . list1 = range ( <NUM_LIT:5> ) <EOL> self . assertEqual ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> ] , self . hobj . list1 ) <EOL> self . hobj . list1 = xrange ( <NUM_LIT:5> ) <EOL> self . assertEqual ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> ] , self . hobj . list1 ) <EOL> self . hobj . list1 = ( x for x in range ( <NUM_LIT:5> ) ) <EOL> self . assertEqual ( [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> ] , self . hobj . list1 ) <EOL> self . hobj . list1 = np . zeros ( <NUM_LIT:1> ) <EOL> self . assertEqual ( [ <NUM_LIT:0.0> ] , self . hobj . list1 ) <EOL> self . hobj . list1 = np . zeros ( ( <NUM_LIT:2> , <NUM_LIT:2> ) ) <EOL> self . assertEqual ( [ [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] , [ <NUM_LIT:0.0> , <NUM_LIT:0.0> ] ] , self . hobj . list1 ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
