diff --git a/tests/test_gldouble_ctypes.py b/tests/test_gldouble_ctypes.py index 79a8ca78..c2c67e58 100644 --- a/tests/test_gldouble_ctypes.py +++ b/tests/test_gldouble_ctypes.py @@ -9,12 +9,9 @@ from OpenGL.arrays import arraydatatype handler = arraydatatype.ArrayDatatype.getHandler( GLdouble * 16 ) handler.registerReturn( ) - import time,traceback start = time.time() - window = None - def display(): try: glutSetWindow(window); @@ -29,19 +26,15 @@ def display(): except Exception: traceback.print_exc() sys.exit(0) - size = (250,250) - def reshape( *args ): global size size = args glViewport( *( (0,0)+args) ) display() - def ontimer( *args ): print('timer', args, '@time', time.time()-start) glutTimerFunc( 1000, ontimer, 24 ) - def idle(): delta = time.time()-start if delta < 10: @@ -70,14 +63,12 @@ def idle(): pass # Older PyOpenGL, you may see a seg-fault here... import sys sys.exit( 0 ) - def printFunction( name ): def onevent( *args ): print('%s -> %s'%(name, ", ".join( [str(a) for a in args ]))) return onevent - if __name__ == "__main__": import sys newArgv = glutInit(sys.argv) @@ -100,6 +91,6 @@ def onevent( *args ): glutSpecialFunc( printFunction( 'Special' )) glutSpecialUpFunc( printFunction( 'SpecialUp' )) glutTimerFunc( 1000, ontimer, 23 ) - + glutIdleFunc( idle ) glutMainLoop() diff --git a/tox.ini b/tox.ini index 47a48e2e..681147a6 100644 --- a/tox.ini +++ b/tox.ini @@ -18,4 +18,5 @@ deps= accel1: ./accelerate #install_command = pip install -I {opts} {packages} commands= - pytest -sv {posargs:tests/} + accel1: pytest -sv -rxXs {posargs:tests/ accelerate/tests} + accel0: pytest -sv -rxXs {posargs:tests/}