def test_globject():
 objects = [GLObject() for i in range(10)]
 ids = [ob.id for ob in objects]
 assert (len(set(ids)) == len(objects))
 commands = []
 for ob in objects:
  commands.extend(ob._glir.clear())
 assert (len(commands) == len(objects))
 for cmd in commands:
  assert (cmd[0] == 'CREATE')
 ob = objects[(-1)]
 q = ob._glir
 ob.delete()
 cmd = q.clear()[(-1)]
 assert (cmd[0] == 'DELETE')

def test_globject ( ) : objects = [ GLObject ( ) for i in range ( 10 ) ] ids = [ ob . id for ob in objects ] assert ( len ( set ( ids ) ) == len ( objects ) ) commands = [ ] for ob in objects : commands . extend ( ob . _glir . clear ( ) ) assert ( len ( commands ) == len ( objects ) ) for cmd in commands : assert ( cmd [ 0 ] == 'CREATE' ) ob = objects [ ( - 1 ) ] q = ob . _glir ob . delete ( ) cmd = q . clear ( ) [ ( - 1 ) ] assert ( cmd [ 0 ] == 'DELETE' )
test gl object uinique id and glir create command .