Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_gl.py @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | e4ae79d53e23 |
| children |
| 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 """ |
| 58763 | 6 import unittest |
|
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
|
7 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
|
8 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
|
9 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
|
10 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
|
11 |
|
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 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
|
13 '__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
|
14 '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
|
15 '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
|
16 '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
|
17 '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
|
18 '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
|
19 '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
|
20 '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
|
21 '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
|
22 '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
|
23 '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
|
24 '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
|
25 '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
|
26 '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
|
27 '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
|
28 '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
|
29 '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
|
30 '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
|
31 '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
|
32 '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
|
33 '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
|
34 '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
|
35 '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
|
36 '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
|
37 '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
|
38 '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
|
39 '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
|
40 '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
|
41 '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
|
42 '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
|
43 '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
|
44 '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
|
45 '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
|
46 '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
|
47 '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
|
48 '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
|
49 '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
|
50 '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
|
51 '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
|
52 '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
|
53 '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
|
54 '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
|
55 '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
|
56 '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
|
57 '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
|
58 '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
|
59 '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
|
60 '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
|
61 '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
|
62 '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
|
63 '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
|
64 '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
|
65 '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
|
66 '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
|
67 '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
|
68 '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
|
69 '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
|
70 '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
|
71 '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
|
72 '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
|
73 '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
|
74 '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
|
75 '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
|
76 '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
|
77 '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
|
78 '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
|
79 '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
|
80 '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
|
81 '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
|
82 '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
|
83 '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
|
84 '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
|
85 '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
|
86 |
|
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
|
87 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
|
88 # 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
|
89 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
|
90 try: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
91 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
|
92 except: |
|
52355
228cfb6e2900
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
Benjamin Peterson <benjamin@python.org>
parents:
52353
diff
changeset
|
93 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
|
94 |
|
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 # 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
|
96 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
97 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
|
98 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
|
99 if verbose: |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
100 print 'touching: ', attr |
|
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
101 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
|
102 |
|
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 # 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
|
104 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
105 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
|
106 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
|
107 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
|
108 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
109 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
|
110 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
|
111 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
112 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
|
113 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
|
114 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
115 print 'clear' |
| 4888 | 116 gl.clear() |
| 117 if verbose: | |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
118 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
|
119 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
|
120 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
121 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
|
122 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
|
123 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
124 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
|
125 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
|
126 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
127 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
|
128 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
|
129 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
130 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
|
131 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
|
132 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
|
133 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
134 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
|
135 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
|
136 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
137 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
|
138 gl.bgnline() |
| 4888 | 139 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
140 print 'v2i' |
| 4888 | 141 gl.v2i(400, 0) |
| 142 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
|
143 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
144 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
|
145 gl.endline() |
| 4888 | 146 if verbose: |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
147 print 'Displaying window for 2 seconds...' |
| 4888 | 148 time.sleep(2) |
| 149 if verbose: | |
|
7747
aedd2d0dcb31
Mass check-in after untabifying all files that need it.
Guido van Rossum <guido@python.org>
parents:
4888
diff
changeset
|
150 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
|
151 gl.winclose(w) |
|
15305
07f24261c6e6
Make reindent.py happy (convert everything to 4-space indents!).
Fred Drake <fdrake@acm.org>
parents:
13858
diff
changeset
|
152 |
|
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
|
153 |
|
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 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
|
155 test_main() |
