Skip to content

Commit

Permalink
Run accelerate tests from base tox as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfletch committed Jan 3, 2020
1 parent 60aec44 commit 57b7706
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 1 addition & 10 deletions tests/test_gldouble_ctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -100,6 +91,6 @@ def onevent( *args ):
glutSpecialFunc( printFunction( 'Special' ))
glutSpecialUpFunc( printFunction( 'SpecialUp' ))
glutTimerFunc( 1000, ontimer, 23 )

glutIdleFunc( idle )
glutMainLoop()
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/}

0 comments on commit 57b7706

Please # to comment.