Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_gl.py @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | f2c90fd05d66 |
| children | e4ae79d53e23 |
| rev | line source |
|---|---|
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
1 #! /usr/bin/env python |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
2 """Very simple test script for the SGI gl library extension module |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
3 taken mostly from the documentation. |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
4 Roger E. Masse |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
5 """ |
|
52456
f2c90fd05d66
Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents:
52355
diff
changeset
|
6 from test.test_support import verbose, import_module |
|
f2c90fd05d66
Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents:
52355
diff
changeset
|
7 import time |
|
f2c90fd05d66
Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents:
52355
diff
changeset
|
8 gl = import_module('gl') |
|
f2c90fd05d66
Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents:
52355
diff
changeset
|
9 GL = import_module('GL') |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
10 |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
11 glattrs = ['RGBcolor', 'RGBcursor', 'RGBmode', 'RGBrange', 'RGBwritemask', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
12 '__doc__', '__name__', 'addtopup', 'altgetmatrix', 'arc', 'arcf', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
13 'arcfi', 'arcfs', 'arci', 'arcs', 'attachcursor', 'backbuffer', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
14 'backface', 'bbox2', 'bbox2i', 'bbox2s', 'bgnclosedline', 'bgnline', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
15 'bgnpoint', 'bgnpolygon', 'bgnsurface', 'bgntmesh', 'bgntrim', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
16 'blankscreen', 'blanktime', 'blendfunction', 'blink', 'c3f', 'c3i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
17 'c3s', 'c4f', 'c4i', 'c4s', 'callobj', 'charstr', 'chunksize', 'circ', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
18 'circf', 'circfi', 'circfs', 'circi', 'circs', 'clear', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
19 'clearhitcode', 'clkoff', 'clkon', 'closeobj', 'cmode', 'cmov', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
20 'cmov2', 'cmov2i', 'cmov2s', 'cmovi', 'cmovs', 'color', 'colorf', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
21 'compactify', 'concave', 'cpack', 'crv', 'crvn', 'curorigin', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
22 'cursoff', 'curson', 'curstype', 'curvebasis', 'curveit', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
23 'curveprecision', 'cyclemap', 'czclear', 'defbasis', 'defcursor', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
24 'deflinestyle', 'delobj', 'deltag', 'depthcue', 'devport', 'dglclose', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
25 'dglopen', 'dither', 'dopup', 'doublebuffer', 'draw', 'draw2', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
26 'draw2i', 'draw2s', 'drawi', 'drawmode', 'draws', 'editobj', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
27 'endclosedline', 'endfullscrn', 'endline', 'endpick', 'endpoint', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
28 'endpolygon', 'endpupmode', 'endselect', 'endsurface', 'endtmesh', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
29 'endtrim', 'finish', 'font', 'foreground', 'freepup', 'frontbuffer', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
30 'fudge', 'fullscrn', 'gRGBcolor', 'gRGBmask', 'gammaramp', 'gbegin', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
31 'gconfig', 'genobj', 'gentag', 'getbackface', 'getbuffer', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
32 'getbutton', 'getcmmode', 'getcolor', 'getcpos', 'getcursor', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
33 'getdcm', 'getdepth', 'getdescender', 'getdisplaymode', 'getdrawmode', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
34 'getfont', 'getgdesc', 'getgpos', 'getheight', 'gethitcode', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
35 'getlsbackup', 'getlsrepeat', 'getlstyle', 'getlwidth', 'getmap', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
36 'getmatrix', 'getmcolor', 'getmmode', 'getmonitor', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
37 'getnurbsproperty', 'getopenobj', 'getorigin', 'getothermonitor', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
38 'getpattern', 'getplanes', 'getport', 'getresetls', 'getscrmask', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
39 'getshade', 'getsize', 'getsm', 'gettp', 'getvaluator', 'getvideo', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
40 'getviewport', 'getwritemask', 'getzbuffer', 'gewrite', 'gflush', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
41 'ginit', 'glcompat', 'greset', 'gselect', 'gsync', 'gversion', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
42 'iconsize', 'icontitle', 'imakebackground', 'initnames', 'ismex', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
43 'isobj', 'isqueued', 'istag', 'keepaspect', 'lRGBrange', 'lampoff', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
44 'lampon', 'linesmooth', 'linewidth', 'lmbind', 'lmcolor', 'lmdef', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
45 'loadmatrix', 'loadname', 'logicop', 'lookat', 'lrectread', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
46 'lrectwrite', 'lsbackup', 'lsetdepth', 'lshaderange', 'lsrepeat', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
47 'makeobj', 'maketag', 'mapcolor', 'mapw', 'mapw2', 'maxsize', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
48 'minsize', 'mmode', 'move', 'move2', 'move2i', 'move2s', 'movei', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
49 'moves', 'multimap', 'multmatrix', 'n3f', 'newpup', 'newtag', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
50 'noborder', 'noise', 'noport', 'normal', 'nurbscurve', 'nurbssurface', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
51 'nvarray', 'objdelete', 'objinsert', 'objreplace', 'onemap', 'ortho', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
52 'ortho2', 'overlay', 'packrect', 'pagecolor', 'pagewritemask', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
53 'passthrough', 'patch', 'patchbasis', 'patchcurves', 'patchprecision', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
54 'pclos', 'pdr', 'pdr2', 'pdr2i', 'pdr2s', 'pdri', 'pdrs', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
55 'perspective', 'pick', 'picksize', 'pixmode', 'pmv', 'pmv2', 'pmv2i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
56 'pmv2s', 'pmvi', 'pmvs', 'pnt', 'pnt2', 'pnt2i', 'pnt2s', 'pnti', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
57 'pnts', 'pntsmooth', 'polarview', 'polf', 'polf2', 'polf2i', 'polf2s', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
58 'polfi', 'polfs', 'poly', 'poly2', 'poly2i', 'poly2s', 'polyi', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
59 'polys', 'popattributes', 'popmatrix', 'popname', 'popviewport', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
60 'prefposition', 'prefsize', 'pupmode', 'pushattributes', 'pushmatrix', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
61 'pushname', 'pushviewport', 'pwlcurve', 'qdevice', 'qenter', 'qgetfd', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
62 'qread', 'qreset', 'qtest', 'rcrv', 'rcrvn', 'rdr', 'rdr2', 'rdr2i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
63 'rdr2s', 'rdri', 'rdrs', 'readdisplay', 'readsource', 'rect', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
64 'rectcopy', 'rectf', 'rectfi', 'rectfs', 'recti', 'rects', 'rectzoom', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
65 'resetls', 'reshapeviewport', 'ringbell', 'rmv', 'rmv2', 'rmv2i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
66 'rmv2s', 'rmvi', 'rmvs', 'rot', 'rotate', 'rpatch', 'rpdr', 'rpdr2', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
67 'rpdr2i', 'rpdr2s', 'rpdri', 'rpdrs', 'rpmv', 'rpmv2', 'rpmv2i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
68 'rpmv2s', 'rpmvi', 'rpmvs', 'sbox', 'sboxf', 'sboxfi', 'sboxfs', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
69 'sboxi', 'sboxs', 'scale', 'screenspace', 'scrmask', 'setbell', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
70 'setcursor', 'setdepth', 'setlinestyle', 'setmap', 'setmonitor', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
71 'setnurbsproperty', 'setpattern', 'setpup', 'setshade', 'setvaluator', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
72 'setvideo', 'shademodel', 'shaderange', 'singlebuffer', 'smoothline', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
73 'spclos', 'splf', 'splf2', 'splf2i', 'splf2s', 'splfi', 'splfs', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
74 'stepunit', 'strwidth', 'subpixel', 'swapbuffers', 'swapinterval', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
75 'swaptmesh', 'swinopen', 'textcolor', 'textinit', 'textport', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
76 'textwritemask', 'tie', 'tpoff', 'tpon', 'translate', 'underlay', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
77 'unpackrect', 'unqdevice', 'v2d', 'v2f', 'v2i', 'v2s', 'v3d', 'v3f', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
78 'v3i', 'v3s', 'v4d', 'v4f', 'v4i', 'v4s', 'varray', 'videocmd', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
79 'viewport', 'vnarray', 'winattach', 'winclose', 'winconstraints', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
80 'windepth', 'window', 'winget', 'winmove', 'winopen', 'winpop', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
81 'winposition', 'winpush', 'winset', 'wintitle', 'wmpack', 'writemask', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
82 'writepixels', 'xfpt', 'xfpt2', 'xfpt2i', 'xfpt2s', 'xfpt4', 'xfpt4i', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
83 'xfpt4s', 'xfpti', 'xfpts', 'zbuffer', 'zclear', 'zdraw', 'zfunction', |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
84 'zsource', 'zwritemask'] |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
85 |
|
45631
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
24442
diff
changeset
|
86 def test_main(): |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
87 # insure that we at least have an X display before continuing. |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
88 import os |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
89 try: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
90 display = os.environ['DISPLAY'] |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
91 except: |
|
52355
228cfb6e2900
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
Benjamin Peterson <benjamin@python.org>
parents:
52353
diff
changeset
|
92 raise unittest.SkipTest, "No $DISPLAY -- skipping gl test" |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
93 |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
94 # touch all the attributes of gl without doing anything |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
95 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
96 print 'Touching gl module attributes...' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
97 for attr in glattrs: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
98 if verbose: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
99 print 'touching: ', attr |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
100 getattr(gl, attr) |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
101 |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
102 # create a small 'Crisscross' window |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
103 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
104 print 'Creating a small "CrissCross" window...' |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
105 print 'foreground' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
106 gl.foreground() |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
107 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
108 print 'prefposition' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
109 gl.prefposition(500, 900, 500, 900) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
110 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
111 print 'winopen "CrissCross"' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
112 w = gl.winopen('CrissCross') |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
113 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
114 print 'clear' |
| 4888 | 115 gl.clear() |
| 116 if verbose: | |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
117 print 'ortho2' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
118 gl.ortho2(0.0, 400.0, 0.0, 400.0) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
119 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
120 print 'color WHITE' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
121 gl.color(GL.WHITE) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
122 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
123 print 'color RED' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
124 gl.color(GL.RED) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
125 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
126 print 'bgnline' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
127 gl.bgnline() |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
128 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
129 print 'v2f' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
130 gl.v2f(0.0, 0.0) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
131 gl.v2f(400.0, 400.0) |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
132 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
133 print 'endline' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
134 gl.endline() |
|
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
135 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
136 print 'bgnline' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
137 gl.bgnline() |
| 4888 | 138 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
139 print 'v2i' |
| 4888 | 140 gl.v2i(400, 0) |
| 141 gl.v2i(0, 400) | |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
142 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
143 print 'endline' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
144 gl.endline() |
| 4888 | 145 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
146 print 'Displaying window for 2 seconds...' |
| 4888 | 147 time.sleep(2) |
| 148 if verbose: | |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
149 print 'winclose' |
|
4827
be481f3ada0b
gl is a *huge* module. This is a very simple test that insures that
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
150 gl.winclose(w) |
|
15305
07f24261c6e6
Make reindent.py happy (convert everything to 4-space indents!).
Fred Drake <fdrake@acm.org>
parents:
13858
diff
changeset
|
151 |
|
45631
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
24442
diff
changeset
|
152 |
|
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
24442
diff
changeset
|
153 if __name__ == '__main__': |
|
a55136c78b60
Add test_main() functions to various tests where it was simple to do. Done so
Brett Cannon <bcannon@gmail.com>
parents:
24442
diff
changeset
|
154 test_main() |
