File: check_silence_numpy_warning.py

package info (click to toggle)
pyopengl 3.1.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,024 kB
  • sloc: python: 108,056; sh: 13; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger('OpenGL.plugins').setLevel(logging.ERROR)


def fail_handler(*args, **named):
    raise RuntimeError("Should not have called this handler!")


logging.getLogger('OpenGL.plugins').addHandler(fail_handler)
from OpenGL.arrays import arraydatatype

dt = arraydatatype.GLuintArray
d = dt.zeros((3,))

print('OK')