code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/env python '''Test that window style can be borderless. Expected behaviour: One borderless window will be opened. Mouse click in the window to close it and end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Holkner $' ...
[ [ 8, 0, 0.1667, 0.1944, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3056, 0.0278, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0278, 0, 0.66,...
[ "'''Test that window style can be borderless.\n\nExpected behaviour:\n One borderless window will be opened.\n\n Mouse click in the window to close it and end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Holkner $'", ...
#!/usr/bin/env python '''Test that mouse scroll event works correctly. Expected behaviour: One window will be opened. Move the scroll wheel and check that events are printed to console. Positive values are associated with scrolling up. Scrolling can also be side-to-side, for example with an Apple M...
[ [ 8, 0, 0.2632, 0.3947, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5, 0.0263, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.5263, 0.0263, 0, 0.66, ...
[ "'''Test that mouse scroll event works correctly.\n\nExpected behaviour:\n One window will be opened. Move the scroll wheel and check that events\n are printed to console. Positive values are associated with scrolling\n up.\n\n Scrolling can also be side-to-side, for example with an Apple Mighty", "...
#!/usr/bin/env python # $Id: $ import unittest from pyglet import window import base_event_sequence __noninteractive = True class TEST_CLASS(base_event_sequence.BaseEventSequence): last_sequence = 3 def on_resize(self, width, height): self.check_sequence(1, 'on_resize') def on_show(self): ...
[ [ 1, 0, 0.1212, 0.0303, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.1818, 0.0303, 0, 0.66, 0.2, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.2424, 0.0303, 0, 0.66,...
[ "import unittest", "from pyglet import window", "import base_event_sequence", "__noninteractive = True", "class TEST_CLASS(base_event_sequence.BaseEventSequence):\n last_sequence = 3\n\n def on_resize(self, width, height):\n self.check_sequence(1, 'on_resize')\n\n def on_show(self):\n ...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import window from pyglet.window.event import WindowEventLogger from pyglet.window import key from pyglet.gl import * import window_util class WINDOW_SET_FULLSCREEN(unittest.TestCase): def on_te...
[ [ 8, 0, 0.0729, 0.0417, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.125, 0.0208, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1458, 0.0208, 0, 0.66, ...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet import window", "from pyglet.window.event import WindowEventLogger", "from pyglet.window import key", "from pyglet.gl import *", "import window_util", "class WINDOW_SET_FULLSCREEN(unittest.T...
#!/usr/bin/env python '''Test that mouse cursor can be made visible and hidden. Expected behaviour: One window will be opened. Press 'v' to hide mouse cursor and 'V' to show mouse cursor. It should only affect the mouse when within the client area of the window. Close the window or press ESC to end...
[ [ 8, 0, 0.175, 0.225, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.325, 0.025, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.35, 0.025, 0, 0.66, 0...
[ "'''Test that mouse cursor can be made visible and hidden.\n\nExpected behaviour:\n One window will be opened. Press 'v' to hide mouse cursor and 'V' to\n show mouse cursor. It should only affect the mouse when within the\n client area of the window.\n\n Close the window or press ESC to end the test."...
#!/usr/bin/env python '''Test that window icon can be set. Expected behaviour: One window will be opened. It will have an icon depicting a yellow "A". Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:...
[ [ 8, 0, 0.1711, 0.2105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3158, 0.0263, 0, 0.66, 0.0909, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3421, 0.0263, 0, 0.66...
[ "'''Test that window icon can be set.\n\nExpected behaviour:\n One window will be opened. It will have an icon depicting a yellow\n \"A\". \n\n Close the window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:...
#!/usr/bin/env python '''Test that show and hide events work correctly. Expected behaviour: One window will be opened. There should be one shown event printed initially. Minimizing and restoring the window should produce hidden and shown events, respectively. On OS X the events should also be fired...
[ [ 8, 0, 0.2179, 0.3077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4103, 0.0256, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4359, 0.0256, 0, 0.66...
[ "'''Test that show and hide events work correctly.\n\nExpected behaviour:\n One window will be opened. There should be one shown event printed\n initially. Minimizing and restoring the window should produce hidden\n and shown events, respectively.\n\n On OS X the events should also be fired when the w...
#!/usr/bin/env python '''Test that activate and deactivate events work correctly. Expected behaviour: One window will be opened. Clicking on the window should activate it, clicking on another window should deactivate it. Messages will be printed to the console for both events. On OS X you can also ...
[ [ 8, 0, 0.2439, 0.3659, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4634, 0.0244, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4878, 0.0244, 0, 0.66...
[ "'''Test that activate and deactivate events work correctly.\n\nExpected behaviour:\n One window will be opened. Clicking on the window should activate it,\n clicking on another window should deactivate it. Messages will be\n printed to the console for both events.\n\n On OS X you can also (de)activat...
#!/usr/bin/env python '''Test that window style can be tool. Expected behaviour: One tool-styled window will be opened. Close the window to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Holkner $' import unittest from pygl...
[ [ 8, 0, 0.1875, 0.2188, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3438, 0.0312, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.375, 0.0312, 0, 0.66,...
[ "'''Test that window style can be tool.\n\nExpected behaviour:\n One tool-styled window will be opened.\n\n Close the window to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Holkner $'", "import unittest", "from...
#!/usr/bin/env python '''Test that image mouse cursor can be set. Expected behaviour: One window will be opened. The mouse cursor in the window will be a custom cursor. Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from pygl...
[ [ 8, 0, 0.1548, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2857, 0.0238, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3095, 0.0238, 0, 0.66, ...
[ "'''Test that image mouse cursor can be set.\n\nExpected behaviour:\n One window will be opened. The mouse cursor in the window will be\n a custom cursor.\n\n Close the window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "fro...
#!/usr/bin/env python '''Test that a window can have multisample. A window will be opened containing two rotating squares. Initially, there will be no multisampling (the edges will look "jaggy"). Press: * M to toggle multisampling on/off * S to increase samples (2, 4, 6, 8, 10, ...) * Shift+S to...
[ [ 8, 0, 0.0704, 0.1185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1407, 0.0074, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1481, 0.0074, 0, 0.66...
[ "'''Test that a window can have multisample.\n\nA window will be opened containing two rotating squares. Initially,\nthere will be no multisampling (the edges will look \"jaggy\"). Press:\n\n * M to toggle multisampling on/off\n * S to increase samples (2, 4, 6, 8, 10, ...)\n * Shift+S to decrease sample...
#!/usr/bin/env python '''Test that vsync can be set. Expected behaviour: A window will alternate between red and green fill. - Press "v" to toggle vsync on/off. "Tearing" should only be visible when vsync is off (as indicated at the terminal). Not all video drivers support vsync. On Linux,...
[ [ 8, 0, 0.1875, 0.3281, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.375, 0.0156, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3906, 0.0156, 0, 0.66, ...
[ "'''Test that vsync can be set.\n\nExpected behaviour: \n A window will alternate between red and green fill. \n\n - Press \"v\" to toggle vsync on/off. \"Tearing\" should only be visible\n when vsync is off (as indicated at the terminal).", "__docformat__ = 'restructuredtext'", "__version__ = ...
#!/usr/bin/env python '''Test that window can be set to and from various fullscreen sizes. Expected behaviour: One window will be opened. Press a number to switch to the corresponding fullscreen size; hold control and press a number to switch back to the corresponding window size: 0 - Default si...
[ [ 8, 0, 0.1667, 0.2738, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3214, 0.0119, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0119, 0, 0.66, ...
[ "'''Test that window can be set to and from various fullscreen sizes.\n\nExpected behaviour:\n One window will be opened. Press a number to switch to the corresponding\n fullscreen size; hold control and press a number to switch back\n to the corresponding window size:\n\n 0 - Default size", "__d...
#!/usr/bin/env python '''Test that window move event works correctly. Expected behaviour: One window will be opened. Move the window and ensure that the location printed to the terminal is correct. Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id:...
[ [ 8, 0, 0.2097, 0.2581, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3871, 0.0323, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4194, 0.0323, 0, 0.66...
[ "'''Test that window move event works correctly.\n\nExpected behaviour:\n One window will be opened. Move the window and ensure that the\n location printed to the terminal is correct.\n\n Close the window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $...
#!/usr/bin/env python '''Test that window can be minimized and maximized. Expected behaviour: One window will be opened. - press "x" to maximize the window. - press "n" to minimize the window. Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id...
[ [ 8, 0, 0.1875, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.025, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.375, 0.025, 0, 0.66, 0...
[ "'''Test that window can be minimized and maximized.\n\nExpected behaviour:\n One window will be opened.\n\n - press \"x\" to maximize the window.\n - press \"n\" to minimize the window.", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet import windo...
#!/usr/bin/env python '''Test that mouse motion event works correctly. Expected behaviour: One window will be opened. Move the mouse in and out of this window and ensure the absolute and relative coordinates are correct. - Absolute coordinates should have (0,0) at bottom-left of client area of wi...
[ [ 8, 0, 0.2353, 0.3235, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4412, 0.0294, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4706, 0.0294, 0, 0.66...
[ "'''Test that mouse motion event works correctly.\n\nExpected behaviour:\n One window will be opened. Move the mouse in and out of this window\n and ensure the absolute and relative coordinates are correct.\n - Absolute coordinates should have (0,0) at bottom-left of client area\n of window with po...
#!/usr/bin/env python '''Test that multiple windows share objects by default. This test is non-interactive. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from ctypes import * from pyglet import window from pyglet.gl import * __noninteractive = True class CONTEXT_SHARE(unittest.Tes...
[ [ 8, 0, 0.0437, 0.0388, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0777, 0.0097, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0874, 0.0097, 0, 0.66...
[ "'''Test that multiple windows share objects by default.\n\nThis test is non-interactive.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from ctypes import *", "from pyglet import window", "from pyglet.gl import *", "__noninteractive = True", "class CONTEX...
#!/usr/bin/env python # $Id: $ import unittest from pyglet import window import base_event_sequence __noninteractive = True class TEST_CLASS(base_event_sequence.BaseEventSequence): last_sequence = 2 def on_resize(self, width, height): self.check_sequence(1, 'on_resize') def on_expose(self): ...
[ [ 1, 0, 0.1176, 0.0294, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.1765, 0.0294, 0, 0.66, 0.2, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.2353, 0.0294, 0, 0.66,...
[ "import unittest", "from pyglet import window", "import base_event_sequence", "__noninteractive = True", "class TEST_CLASS(base_event_sequence.BaseEventSequence):\n last_sequence = 2\n\n def on_resize(self, width, height):\n self.check_sequence(1, 'on_resize')\n\n def on_expose(self):\n ...
#!/usr/bin/env python '''Test that the window can be activated (focus set). Expected behaviour: One window will be opened. Every 5 seconds it will be activated; it should be come to the front and accept keyboard input (this will be shown on the terminal). On Windows XP, the taskbar icon may flash (i...
[ [ 8, 0, 0.225, 0.325, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.425, 0.025, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.45, 0.025, 0, 0.66, 0....
[ "'''Test that the window can be activated (focus set).\n\nExpected behaviour:\n One window will be opened. Every 5 seconds it will be activated;\n it should be come to the front and accept keyboard input (this will\n be shown on the terminal).\n\n On Windows XP, the taskbar icon may flash (indicating t...
#!/usr/bin/env python '''Test that text events work correctly. Expected behaviour: One window will be opened. Type into this window and check the console output for text events. - Repeated when keys are held down - Motion events (e.g., arrow keys, HOME/END, etc) are reported - Select events ...
[ [ 8, 0, 0.2159, 0.3182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4091, 0.0227, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4318, 0.0227, 0, 0.66...
[ "'''Test that text events work correctly.\n\nExpected behaviour:\n One window will be opened. Type into this window and check the console\n output for text events. \n - Repeated when keys are held down\n - Motion events (e.g., arrow keys, HOME/END, etc) are reported\n - Select events (motion + S...
#!/usr/bin/env python '''Test that a non-resizable window's size can be set. Expected behaviour: One window will be opened. The window's dimensions will be printed to the terminal. - press "x" to increase the width - press "X" to decrease the width - press "y" to increase the height - ...
[ [ 8, 0, 0.1923, 0.2885, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3654, 0.0192, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3846, 0.0192, 0, 0.66,...
[ "'''Test that a non-resizable window's size can be set.\n\nExpected behaviour:\n One window will be opened. The window's dimensions will be printed\n to the terminal. \n\n - press \"x\" to increase the width\n - press \"X\" to decrease the width", "__docformat__ = 'restructuredtext'", "__version...
#!/usr/bin/env python '''Test that mouse enter and leave events work correctly. Expected behaviour: One window will be opened. Move the mouse in and out of this window and ensure the events displayed are correct. Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __ve...
[ [ 8, 0, 0.1912, 0.2353, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3529, 0.0294, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3824, 0.0294, 0, 0.66...
[ "'''Test that mouse enter and leave events work correctly.\n\nExpected behaviour:\n One window will be opened. Move the mouse in and out of this window\n and ensure the events displayed are correct.\n\n Close the window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__vers...
#!/usr/bin/python # $Id:$ from pyglet.gl import * def draw_client_border(window): glClearColor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0, window.width, 0, window.height, -1, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity()...
[ [ 1, 0, 0.1429, 0.0357, 0, 0.66, 0, 531, 0, 1, 0, 0, 531, 0, 0 ], [ 2, 0, 0.6071, 0.8214, 0, 0.66, 1, 910, 0, 1, 0, 0, 0, 0, 17 ], [ 8, 1, 0.25, 0.0357, 1, 0.75, ...
[ "from pyglet.gl import *", "def draw_client_border(window):\n glClearColor(0, 0, 0, 1)\n glClear(GL_COLOR_BUFFER_BIT)\n\n glMatrixMode(GL_PROJECTION)\n glLoadIdentity()\n glOrtho(0, window.width, 0, window.height, -1, 1)", " glClearColor(0, 0, 0, 1)", " glClear(GL_COLOR_BUFFER_BIT)", " ...
#!/usr/bin/env python '''Test that a window can be opened fullscreen. Expected behaviour: A fullscreen window will be created, with a flat purple colour. - Press 'g' to leave fullscreen mode and create a window. - Press 'f' to re-enter fullscreen mode. - All events will be printed to the console. ...
[ [ 8, 0, 0.1471, 0.2353, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2941, 0.0196, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3137, 0.0196, 0, 0.66, ...
[ "'''Test that a window can be opened fullscreen.\n\nExpected behaviour: \n A fullscreen window will be created, with a flat purple colour.\n\n - Press 'g' to leave fullscreen mode and create a window.\n - Press 'f' to re-enter fullscreen mode.\n - All events will be printed to the console. Ensure th...
#!/usr/bin/env python '''Test that resize event works correctly. Expected behaviour: One window will be opened. Resize the window and ensure that the dimensions printed to the terminal are correct. You should see a green border inside the window but no red. Close the window or press ESC to end the ...
[ [ 8, 0, 0.1944, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3611, 0.0278, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0278, 0, 0.66, ...
[ "'''Test that resize event works correctly.\n\nExpected behaviour:\n One window will be opened. Resize the window and ensure that the\n dimensions printed to the terminal are correct. You should see\n a green border inside the window but no red.\n\n Close the window or press ESC to end the test.", "...
#!/usr/bin/env python '''Test that window can be resized. Expected behaviour: One window will be opened. It should be resizable by the user. Close the window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Ho...
[ [ 8, 0, 0.1765, 0.2059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3235, 0.0294, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3529, 0.0294, 0, 0.66...
[ "'''Test that window can be resized.\n\nExpected behaviour:\n One window will be opened. It should be resizable by the user. \n\n Close the window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: WINDOW_SET_MOUSE_CURSOR.py 717 2007-03-03 07:04:10Z Alex.Holkn...
#!/usr/bin/env python '''Test that mouse cursor can be set to a platform-dependent image. Expected behaviour: One window will be opened. Press the left and right arrow keys to cycle through the system mouse cursors. The current cursor selected will be printed to the terminal. Note that not all curs...
[ [ 8, 0, 0.1233, 0.1781, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2329, 0.0137, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2466, 0.0137, 0, 0.66,...
[ "'''Test that mouse cursor can be set to a platform-dependent image.\n\nExpected behaviour:\n One window will be opened. Press the left and right arrow keys to cycle\n through the system mouse cursors. The current cursor selected will\n be printed to the terminal.\n\n Note that not all cursors are uni...
#!/usr/bin/env python '''Test that multiple windows can be opened. Expected behaviour: Two small windows will be opened, one coloured yellow and the other purple. Close either window or press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet...
[ [ 8, 0, 0.131, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2619, 0.0238, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2857, 0.0238, 0, 0.66,...
[ "'''Test that multiple windows can be opened.\n\nExpected behaviour: \n Two small windows will be opened, one coloured yellow and the other\n purple.\n\n Close either window or press ESC to end the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from...
#!/usr/bin/python # $Id:$ import unittest import time class BaseEventSequence(unittest.TestCase): next_sequence = 0 last_sequence = 0 finished = False timeout = 2 start_time = time.time() def check_sequence(self, sequence, name): if self.next_sequence == 0 and sequence != 0: ...
[ [ 1, 0, 0.1333, 0.0333, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.1667, 0.0333, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6, 0.7667, 0, 0.66, ...
[ "import unittest", "import time", "class BaseEventSequence(unittest.TestCase):\n next_sequence = 0\n last_sequence = 0\n finished = False\n timeout = 2\n start_time = time.time()\n\n def check_sequence(self, sequence, name):", " next_sequence = 0", " last_sequence = 0", " finish...
#!/usr/bin/env python '''Test that window can be set fullscreen and back again. Expected behaviour: One window will be opened. - press "f" to enter fullscreen mode. - press "g" to leave fullscreen mode. All events will be printed to the terminal. Close the window or press ESC to end the tes...
[ [ 8, 0, 0.17, 0.24, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.32, 0.02, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.34, 0.02, 0, 0.66, 0.2222...
[ "'''Test that window can be set fullscreen and back again.\n\nExpected behaviour:\n One window will be opened. \n\n - press \"f\" to enter fullscreen mode.\n - press \"g\" to leave fullscreen mode.", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet ...
#!/usr/bin/env python '''Test that the window caption can be set. Expected behaviour: Two windows will be opened, one with the caption "Window caption 1" counting up every second; the other with a Unicode string including some non-ASCII characters. Press escape or close either window to finished the ...
[ [ 8, 0, 0.1795, 0.2308, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3333, 0.0256, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.359, 0.0256, 0, 0.66,...
[ "'''Test that the window caption can be set.\n\nExpected behaviour:\n Two windows will be opened, one with the caption \"Window caption 1\"\n counting up every second; the other with a Unicode string including\n some non-ASCII characters.\n\n Press escape or close either window to finished the test.", ...
#!/usr/bin/env python '''Test that all public modules are accessible after importing just 'pyglet'. This _must_ be the first test run. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import unittest import pyglet __noninteractive = True modules = [ ...
[ [ 8, 0, 0.0652, 0.058, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1159, 0.0145, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1304, 0.0145, 0, 0.66,...
[ "'''Test that all public modules are accessible after importing just 'pyglet'.\n\nThis _must_ be the first test run.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $'", "import unittest", "import pyglet", "__noninteractive = True", "module...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_24bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_lo...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_24bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.T...
#!/usr/bin/env python '''Test DXT1 compressed RGBA load from a DDS file. You should see the rgba_dxt1.dds image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.dds import DDSImageDecoder class TEST_DDS_...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test DXT1 compressed RGBA load from a DDS file. You should see the\nrgba_dxt1.dds image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.dds import DDSImageDecoder", "class TEST_DDS_RGBA...
#!/usr/bin/env python '''Test RGBA save using PyPNG. You should see rgba.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test RGBA save using PyPNG. You should see rgba.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import...
#!/usr/bin/env python '''Test LA load using PyPNG. You should see the la.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_LA_LOAD(base_load.TestLoad):...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test LA load using PyPNG. You should see the la.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.png import PNGImageDecoder", "class TEST_PNG_LA_LOAD(base_load.TestLoad):\n ...
#!/usr/bin/env python '''Test LA load using PIL. You should see the la.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.pil import * class TEST_PNG_LA(base_load.TestLoad): texture_file = ...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test LA load using PIL. You should see the la.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.pil import *", "class TEST_PNG_LA(base_load.TestLoad):\n texture_file = 'la....
#!/usr/bin/env python '''Test rearrangement of color components using the OpenGL color matrix. The test will be skipped if the GL_ARB_imaging extension is not present. You should see the RGBA test image correctly rendered. Press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$I...
[ [ 8, 0, 0.1719, 0.1875, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3125, 0.0312, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3438, 0.0312, 0, 0.66,...
[ "'''Test rearrangement of color components using the OpenGL color matrix.\nThe test will be skipped if the GL_ARB_imaging extension is not present.\n\nYou should see the RGBA test image correctly rendered. Press ESC to\nend the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "impor...
#!/usr/bin/env python '''Test LA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the la.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load import sys if sys.platform == 'linux2': from p...
[ [ 8, 0, 0.1333, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2667, 0.0333, 0, 0.66, ...
[ "'''Test LA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk).\nYou should see the la.png image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "import sys", "if sys.platform == 'linux2':\n from pyg...
#!/usr/bin/env python '''Test RGB load using PyPNG. You should see the rgb.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_RGB_LOAD(base_load.TestL...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test RGB load using PyPNG. You should see the rgb.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "from pyglet.image.codecs.png import PNGImageDecoder", "class TEST_PNG_RGB_LOAD(base_load.TestLoad)...
#!/usr/bin/env python '''Test DXT3 compressed RGBA load from a DDS file. You should see the rgba_dxt3.dds image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.dds import DDSImageDecoder class TEST_DDS_...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test DXT3 compressed RGBA load from a DDS file. You should see the\nrgba_dxt3.dds image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.dds import DDSImageDecoder", "class TEST_DDS_RGBA...
#!/usr/bin/env python '''Test rearrangement of color components using the OpenGL color matrix. The test will be skipped if the GL_ARB_imaging extension is not present. You should see the RGB test image correctly rendered. Press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id...
[ [ 8, 0, 0.1667, 0.1818, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.303, 0.0303, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0303, 0, 0.66, ...
[ "'''Test rearrangement of color components using the OpenGL color matrix.\nThe test will be skipped if the GL_ARB_imaging extension is not present.\n\nYou should see the RGB test image correctly rendered. Press ESC to\nend the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_32bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_lo...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_32bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.T...
#!/usr/bin/python # $Id:$ import unittest from pyglet.image import atlas __noninteractive = True class Rect(object): def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 def __repr__(self): return 'Rect(%d, %d to %d, %d)' % ( ...
[ [ 1, 0, 0.0435, 0.0109, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0652, 0.0109, 0, 0.66, 0.1667, 149, 0, 1, 0, 0, 149, 0, 0 ], [ 14, 0, 0.087, 0.0109, 0, 0....
[ "import unittest", "from pyglet.image import atlas", "__noninteractive = True", "class Rect(object):\n def __init__(self, x1, y1, x2, y2):\n self.x1 = x1\n self.y1 = y1\n self.x2 = x2\n self.y2 = y2\n\n def __repr__(self):", " def __init__(self, x1, y1, x2, y2):\n ...
#!/usr/bin/env python '''Test RGB load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the rgb.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load import sys if sys.platform == 'linux2': fr...
[ [ 8, 0, 0.1333, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2667, 0.0333, 0, 0.66, ...
[ "'''Test RGB load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk).\nYou should see the rgb.png image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "import sys", "if sys.platform == 'linux2':\n from...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgba_32bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_l...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgba_32bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load....
#!/usr/bin/env python '''Test L load using PyPNG. You should see the l.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_L_LOAD(base_load.TestLoad): ...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test L load using PyPNG. You should see the l.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.png import PNGImageDecoder", "class TEST_PNG_L_LOAD(base_load.TestLoad):\n t...
#!/usr/bin/env python '''Test RGB load using PIL. You should see the rgb.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load from pyglet.image.codecs.pil import * class TEST_PIL_RGB_LOAD(base_load.TestLoad): textu...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test RGB load using PIL. You should see the rgb.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "from pyglet.image.codecs.pil import *", "class TEST_PIL_RGB_LOAD(base_load.TestLoad):\n texture_f...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_4bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_loa...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_4bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.Te...
#!/usr/bin/env python '''Test RGBA save using PIL. You should see rgba.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest ...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test RGBA save using PIL. You should see rgba.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import b...
#!/usr/bin/env python '''Test RGBA load using PIL. You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load from pyglet.image.codecs.pil import * class TEST_PIL_RGBA_LOAD(base_load.TestLoad): te...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test RGBA load using PIL. You should see the rgba.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "from pyglet.image.codecs.pil import *", "class TEST_PIL_RGBA_LOAD(base_load.TestLoad):\n textur...
#!/usr/bin/env python '''Test DXT5 compressed RGBA load from a DDS file. You should see the rgba_dxt5.dds image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.dds import DDSImageDecoder class TEST_DDS_...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test DXT5 compressed RGBA load from a DDS file. You should see the\nrgba_dxt5.dds image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.dds import DDSImageDecoder", "class TEST_DDS_RGBA...
#!/usr/bin/env python '''Test colour buffer save. A scene consisting of a single coloured triangle will be rendered. The colour buffer will then be saved to a stream and loaded as a texture. You will see the original scene first for up to several seconds before the buffer image appears (because retrieving...
[ [ 8, 0, 0.1293, 0.1724, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2414, 0.0172, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2586, 0.0172, 0, 0.66...
[ "'''Test colour buffer save. \n\nA scene consisting of a single coloured triangle will be rendered. The\ncolour buffer will then be saved to a stream and loaded as a texture.\n\nYou will see the original scene first for up to several seconds before the\nbuffer image appears (because retrieving and saving the imag...
#!/usr/bin/env python '''Test DXT1 compressed RGB load from a DDS file. You should see the rgb_dxt1.dds image. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.dds import DDSImageDecoder class TEST_DDS_RGB_DXT1(base_load.TestLoad):...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test DXT1 compressed RGB load from a DDS file. You should see the\nrgb_dxt1.dds image.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.dds import DDSImageDecoder", "class TEST_DDS_RGB_DXT1(base_load.TestLoad):\n ...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_1bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_loa...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_1bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.Te...
#!/usr/bin/env python '''Base class for image tests. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from StringIO import StringIO from os.path import dirname, join from pyglet.gl import * from pyglet import image from pyglet.image import codecs from pyglet.window import * from pyglet....
[ [ 8, 0, 0.0324, 0.0185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0556, 0.0093, 0, 0.66, 0.0769, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0648, 0.0093, 0, 0.66...
[ "'''Base class for image tests.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from StringIO import StringIO", "from os.path import dirname, join", "from pyglet.gl import *", "from pyglet import image", "from pyglet.image import codecs", "from pyglet.win...
#!/usr/bin/env python '''Test RGBA load using PyPNG. You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_RGBA_LOAD(base_load.Te...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test RGBA load using PyPNG. You should see the rgba.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "from pyglet.image.codecs.png import PNGImageDecoder", "class TEST_PNG_RGBA_LOAD(base_load.TestLo...
#!/usr/bin/env python '''Test L load using PIL. You should see the la.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.pil import * class TEST_PIL_L(base_load.TestLoad): texture_file = 'l...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test L load using PIL. You should see the la.png image on \na checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.pil import *", "class TEST_PIL_L(base_load.TestLoad):\n texture_file = 'l.png...
#!/usr/bin/env python '''Test RGB save using PIL. You should see rgb.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest im...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test RGB save using PIL. You should see rgb.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import bas...
#!/usr/bin/env python '''Test colour buffer copy to texture. A scene consisting of a single coloured triangle will be rendered. The colour buffer will then be saved to a stream and loaded as a texture. You will see the original scene first for up to several seconds before the buffer image appears (because r...
[ [ 8, 0, 0.1415, 0.1887, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2642, 0.0189, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.283, 0.0189, 0, 0.66,...
[ "'''Test colour buffer copy to texture.\n\nA scene consisting of a single coloured triangle will be rendered. The\ncolour buffer will then be saved to a stream and loaded as a texture.\n\nYou will see the original scene first for up to several seconds before the\nbuffer image appears (because retrieving and saving...
#!/usr/bin/env python '''Base class for image tests. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from os.path import dirname, join from pyglet.gl import * from pyglet import image from pyglet.image import codecs from pyglet.window import * from pyglet.window.event import * from te...
[ [ 8, 0, 0.0393, 0.0225, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0674, 0.0112, 0, 0.66, 0.0833, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0787, 0.0112, 0, 0.66...
[ "'''Base class for image tests.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from os.path import dirname, join", "from pyglet.gl import *", "from pyglet import image", "from pyglet.image import codecs", "from pyglet.window import *", "from pyglet.windo...
#!/usr/bin/env python '''Test LA save using PyPNG. You should see la.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest impo...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test LA save using PyPNG. You should see la.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_...
#!/usr/bin/env python '''Test L load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the l.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load import sys if sys.platform == 'linux2': from pyg...
[ [ 8, 0, 0.1333, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2667, 0.0333, 0, 0.66, ...
[ "'''Test L load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk).\nYou should see the l.png image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "import sys", "if sys.platform == 'linux2':\n from pygle...
#!/usr/bin/env python '''Test LA save using PIL. You should see la.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test LA save using PIL. You should see la.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_sa...
#!/usr/bin/env python '''Test L save using PIL. You should see l.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import b...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test L save using PIL. You should see l.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_save...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet.gl import * from pyglet.image import * from pyglet.window import * __noninteractive = True class TestTextureGrid(unittest.TestCase): def set_grid_image(self, itemwidth, itemheight, rows, cols, r...
[ [ 8, 0, 0.035, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.06, 0.01, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.07, 0.01, 0, 0.66, 0.222...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet.gl import *", "from pyglet.image import *", "from pyglet.window import *", "__noninteractive = True", "class TestTextureGrid(unittest.TestCase):\n def set_grid_image(self, itemwidth, itemhe...
#!/usr/bin/env python '''Test depth buffer save. A scene consisting of a single coloured triangle will be rendered. The depth buffer will then be saved to a stream and loaded as a texture. You will see the original scene first for up to several seconds before the depth buffer image appears (because retrie...
[ [ 8, 0, 0.121, 0.1613, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2258, 0.0161, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2419, 0.0161, 0, 0.66,...
[ "'''Test depth buffer save. \n\nA scene consisting of a single coloured triangle will be rendered. The\ndepth buffer will then be saved to a stream and loaded as a texture.\n\nYou will see the original scene first for up to several seconds before the\ndepth buffer image appears (because retrieving and saving the ...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet.gl import * from pyglet.image import * from pyglet.window import * __noninteractive = True class TestTexture3D(unittest.TestCase): def create_image(self, width, height, color): data = ('...
[ [ 8, 0, 0.0307, 0.0175, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0526, 0.0088, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0614, 0.0088, 0, 0.66...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet.gl import *", "from pyglet.image import *", "from pyglet.window import *", "__noninteractive = True", "class TestTexture3D(unittest.TestCase):\n def create_image(self, width, height, color)...
#!/usr/bin/env python '''Test that the checkerboard pattern looks correct. One window will open, it should show one instance of the checkerboard pattern in two levels of grey. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet.gl import * from pyglet import image from pyglet....
[ [ 8, 0, 0.1064, 0.1064, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1915, 0.0213, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2128, 0.0213, 0, 0.66, ...
[ "'''Test that the checkerboard pattern looks correct.\n\nOne window will open, it should show one instance of the checkerboard\npattern in two levels of grey.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "from pyglet.gl import *", "from pyglet import image", ...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_16bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_lo...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_16bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.T...
#!/usr/bin/env python '''Test L save using PyPNG. You should see l.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test L save using PyPNG. You should see l.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_sa...
#!/usr/bin/env python '''Test RGB save using PyPNG. You should see rgb.png reference image on the left, and saved (and reloaded) image on the right. The saved image may have larger dimensions due to texture size restrictions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest ...
[ [ 8, 0, 0.2143, 0.1905, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.381, 0.0476, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4286, 0.0476, 0, 0.66,...
[ "'''Test RGB save using PyPNG. You should see rgb.png reference image\non the left, and saved (and reloaded) image on the right. The saved image\nmay have larger dimensions due to texture size restrictions.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import b...
#!/usr/bin/env python '''Test load using the Python BMP loader. You should see the rgb_8bpp.bmp image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.bmp import BMPImageDecoder class TEST_SUITE(base_loa...
[ [ 8, 0, 0.2, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.35, 0.05, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4, 0.05, 0, 0.66, 0.2857, ...
[ "'''Test load using the Python BMP loader. You should see the rgb_8bpp.bmp\nimage on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import unittest", "import base_load", "from pyglet.image.codecs.bmp import BMPImageDecoder", "class TEST_SUITE(base_load.Te...
#!/usr/bin/env python '''Test RGBA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load import sys if sys.platform == 'linux2': ...
[ [ 8, 0, 0.1333, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2667, 0.0333, 0, 0.66, ...
[ "'''Test RGBA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk).\nYou should see the rgba.png image on a checkboard background.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import base_load", "import sys", "if sys.platform == 'linux2':\n fr...
#!/usr/bin/env python '''Test framework for pyglet. Reads details of components and capabilities from a requirements document, runs the appropriate unit tests. Overview -------- First, some definitions: Test case: A single test, implemented by a Python module in the tests/ directory. Tests can be interacti...
[ [ 8, 0, 0.1556, 0.3017, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3093, 0.0019, 0, 0.66, 0.0417, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3112, 0.0019, 0, 0.66...
[ "'''Test framework for pyglet. Reads details of components and capabilities\nfrom a requirements document, runs the appropriate unit tests.\n\nOverview\n--------\n\nFirst, some definitions:", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import array", "import logging", "import os", ...
#!/usr/bin/env python '''Test that inline elements can have their style changed, even after text has been deleted before them. [This triggers bug 538 if it has not yet been fixed.] To run the test, delete the first line, one character at a time, verifying that the element remains visible and no tracebacks are printed...
[ [ 8, 0, 0.0614, 0.0789, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.114, 0.0088, 0, 0.66, 0.0833, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1228, 0.0088, 0, 0.66,...
[ "'''Test that inline elements can have their style changed, even after text\nhas been deleted before them. [This triggers bug 538 if it has not yet been fixed.]\n\nTo run the test, delete the first line, one character at a time,\nverifying that the element remains visible and no tracebacks are\nprinted to the conso...
#!/usr/bin/env python '''Test that HTML data is decoded into a formatted document. Press ESC to exit the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: ELEMENT.py 1764 2008-02-16 05:24:46Z Alex.Holkner $' import unittest import pyglet from pyglet.text import caret, document, layout doctext = ''' ...
[ [ 8, 0, 0.0183, 0.0163, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0325, 0.0041, 0, 0.66, 0.1111, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0366, 0.0041, 0, 0.66...
[ "'''Test that HTML data is decoded into a formatted document.\n\nPress ESC to exit the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: ELEMENT.py 1764 2008-02-16 05:24:46Z Alex.Holkner $'", "import unittest", "import pyglet", "from pyglet.text import caret, document, layout", "do...
#!/usr/bin/env python '''Test that an empty document doesn't break, even when its (nonexistent) text is set to bold. ''' __docformat__ = 'restructuredtext' __noninteractive = True import unittest from pyglet import gl from pyglet import graphics from pyglet.text import document from pyglet.text import layout from ...
[ [ 8, 0, 0.087, 0.0652, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1522, 0.0217, 0, 0.66, 0.0909, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1957, 0.0217, 0, 0.66,...
[ "'''Test that an empty document doesn't break, even when its\n(nonexistent) text is set to bold.\n'''", "__docformat__ = 'restructuredtext'", "__noninteractive = True", "import unittest", "from pyglet import gl", "from pyglet import graphics", "from pyglet.text import document", "from pyglet.text impo...
#!/usr/bin/env python '''Test that character and paragraph-level style is adhered to correctly in incremental layout. Examine and type over the text in the window that appears. The window contents can be scrolled with the mouse wheel. There are no formatting commands, however formatting should be preserved as expec...
[ [ 8, 0, 0.0329, 0.0439, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0614, 0.0044, 0, 0.66, 0.0667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0658, 0.0044, 0, 0.66...
[ "'''Test that character and paragraph-level style is adhered to correctly in\nincremental layout.\n\nExamine and type over the text in the window that appears. The window\ncontents can be scrolled with the mouse wheel. There are no formatting\ncommands, however formatting should be preserved as expected when ente...
#!/usr/bin/python # $Id:$ from pyglet.text import runlist import unittest __noninteractive = True class TestStyleRuns(unittest.TestCase): def check_value(self, runs, value): for i, style in enumerate(value): self.assertTrue(runs[i] == style, repr(runs.runs)) self.check_optimal(runs) ...
[ [ 1, 0, 0.0133, 0.0033, 0, 0.66, 0, 988, 0, 1, 0, 0, 988, 0, 0 ], [ 1, 0, 0.0199, 0.0033, 0, 0.66, 0.25, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 14, 0, 0.0266, 0.0033, 0, 0.6...
[ "from pyglet.text import runlist", "import unittest", "__noninteractive = True", "class TestStyleRuns(unittest.TestCase):\n def check_value(self, runs, value):\n for i, style in enumerate(value):\n self.assertTrue(runs[i] == style, repr(runs.runs))\n self.check_optimal(runs)\n ...
#!/usr/bin/env python '''Test that an empty document doesn't break. ''' __docformat__ = 'restructuredtext' __noninteractive = True import unittest from pyglet import gl from pyglet import graphics from pyglet.text import document from pyglet.text import layout from pyglet import window class TestWindow(window.Win...
[ [ 8, 0, 0.0795, 0.0455, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1364, 0.0227, 0, 0.66, 0.0909, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1818, 0.0227, 0, 0.66...
[ "'''Test that an empty document doesn't break.\n'''", "__docformat__ = 'restructuredtext'", "__noninteractive = True", "import unittest", "from pyglet import gl", "from pyglet import graphics", "from pyglet.text import document", "from pyglet.text import layout", "from pyglet import window", "clas...
#!/usr/bin/env python '''Test that the code snippets mentioned in issue 471 (and related issues 241 and 429) don't have exceptions. (Most of them delete all text in a formatted document with some styles set; one of them (like the test in EMPTY_BOLD.py) sets style on a 0-length range of text in an empty document.) '''...
[ [ 8, 0, 0.0968, 0.1129, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1774, 0.0161, 0, 0.66, 0.1667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2097, 0.0161, 0, 0.66...
[ "'''Test that the code snippets mentioned in issue 471\n(and related issues 241 and 429) don't have exceptions.\n\n(Most of them delete all text in a formatted document\nwith some styles set; one of them (like the test in EMPTY_BOLD.py)\nsets style on a 0-length range of text in an empty document.)\n'''", "__docf...
#!/usr/bin/env python '''Test an unformatted document is editable. Examine and type over the text in the window that appears. The window contents can be scrolled with the mouse wheel. Press ESC to exit the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: STYLE.py 1754 2008-02-10 13:26:52Z Alex.Holk...
[ [ 8, 0, 0.0714, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.131, 0.0119, 0, 0.66, 0.0667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1429, 0.0119, 0, 0.66,...
[ "'''Test an unformatted document is editable.\n\nExamine and type over the text in the window that appears. The window\ncontents can be scrolled with the mouse wheel.\n\nPress ESC to exit the test.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: STYLE.py 1754 2008-02-10 13:26:52Z Alex.Holkner...
#!/usr/bin/env python '''Test that inline elements are positioned correctly and are repositioned within an incremental layout. Examine and type over the text in the window that appears. There are several elements drawn with grey boxes. These should maintain their sizes and relative document positions as the text is...
[ [ 8, 0, 0.047, 0.0604, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0872, 0.0067, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.094, 0.0067, 0, 0.66, ...
[ "'''Test that inline elements are positioned correctly and are repositioned\nwithin an incremental layout.\n\nExamine and type over the text in the window that appears. There are several\nelements drawn with grey boxes. These should maintain their sizes and\nrelative document positions as the text is scrolled and...
#!/usr/bin/env python '''Test content_valign = 'center' property of IncrementalTextLayout. Examine and type over the text in the window that appears. The window contents can be scrolled with the mouse wheel. When the content height is less than the window height, the content should be aligned to the center of the w...
[ [ 8, 0, 0.0805, 0.1034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1494, 0.0115, 0, 0.66, 0.0667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1609, 0.0115, 0, 0.66...
[ "'''Test content_valign = 'center' property of IncrementalTextLayout.\n\nExamine and type over the text in the window that appears. The window\ncontents can be scrolled with the mouse wheel. When the content height\nis less than the window height, the content should be aligned to the center\nof the window.\n\nPre...
#!/usr/bin/env python '''Test content_valign = 'bottom' property of IncrementalTextLayout. Examine and type over the text in the window that appears. The window contents can be scrolled with the mouse wheel. When the content height is less than the window height, the content should be aligned to the bottom of the w...
[ [ 8, 0, 0.0805, 0.1034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1494, 0.0115, 0, 0.66, 0.0667, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1609, 0.0115, 0, 0.66...
[ "'''Test content_valign = 'bottom' property of IncrementalTextLayout.\n\nExamine and type over the text in the window that appears. The window\ncontents can be scrolled with the mouse wheel. When the content height\nis less than the window height, the content should be aligned to the bottom\nof the window.\n\nPre...
#!/usr/bin/env python '''Test that a scheduled function gets called every interval with the correct time delta. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import time import unittest from pyglet import clock __noninteractive = True class SCHEDULE_IN...
[ [ 8, 0, 0.0741, 0.0556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1296, 0.0185, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1481, 0.0185, 0, 0.66,...
[ "'''Test that a scheduled function gets called every interval with the correct\ntime delta.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "cla...
#!/usr/bin/env python '''Test that the clock effectively limits the FPS to 20 Hz when requested. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import time import unittest from pyglet import clock __noninteractive = True class FPS_LIMIT(unittest.TestCase): def test_fps_limit(self): clock....
[ [ 8, 0, 0.1167, 0.0667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, ...
[ "'''Test that the clock effectively limits the FPS to 20 Hz when requested.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "class FPS_LIMIT(unittest.TestCase):\n def test_fps_limit(self):\...
#!/usr/bin/env python '''Test that a scheduled function gets called every tick with the correct time delta. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import time import unittest from pyglet import clock __noninteractive = True class SCHEDULE(unitte...
[ [ 8, 0, 0.05, 0.0375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0875, 0.0125, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1, 0.0125, 0, 0.66, ...
[ "'''Test that a scheduled function gets called every tick with the correct\ntime delta.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "class S...
#!/usr/bin/env python # Contributed by Claudio Canepa # Integrated by Ben Smith """ There is the possibility that time.clock be non monotonic in multicore hardware, due to the underlaying use of win32 QueryPerformanceCounter. If your update is seeing a negative dt, then time.clock is probably the culprit. AM...
[ [ 8, 0, 0.2143, 0.1143, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3143, 0.0286, 0, 0.66, 0.1429, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3429, 0.0286, 0, 0.66...
[ "\"\"\" There is the possibility that time.clock be non monotonic in multicore hardware, \ndue to the underlaying use of win32 QueryPerformanceCounter.\nIf your update is seeing a negative dt, then time.clock is probably the culprit.\nAMD or Intel Patches for multicore may fix this problem (if you see it at all)\"\...
#!/usr/bin/env python '''Test that the clock returns a reasonable average FPS calculation when stimulated at 5 Hz. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import time import unittest from pyglet import clock __noninteractive = True class FPS(unittest.TestCase): def test_fps(self): ...
[ [ 8, 0, 0.1429, 0.1071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.25, 0.0357, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2857, 0.0357, 0, 0.66, ...
[ "'''Test that the clock returns a reasonable average FPS calculation when\nstimulated at 5 Hz.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "class FPS(unittest.TestCase):\n def test_fps(...
#!/usr/bin/env python '''Test that the clock tick function returns the elaspsed time between frames, in seconds. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import time import unittest from pyglet import clock __noninteractive = True class TICK(unittest.TestCase): def test_tick(self): ...
[ [ 8, 0, 0.1333, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2667, 0.0333, 0, 0.66, ...
[ "'''Test that the clock tick function returns the elaspsed time between\nframes, in seconds.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id$'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "class TICK(unittest.TestCase):\n def test_tick(...
#!/usr/bin/env python '''Test that a scheduled function gets called every once with the correct time delta. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $' import time import unittest from pyglet import clock __noninteractive = True class SCHEDULE_ONCE(u...
[ [ 8, 0, 0.0741, 0.0556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1296, 0.0185, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1481, 0.0185, 0, 0.66,...
[ "'''Test that a scheduled function gets called every once with the correct\ntime delta.\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: TICK.py 310 2006-12-23 15:56:35Z Alex.Holkner $'", "import time", "import unittest", "from pyglet import clock", "__noninteractive = True", "class S...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import pyglet from graphics_common import * __noninteractive = True class TEST_CASE(unittest.TestCase): def check(self, expected, result, dimensions): if len(expected) != len(result) * dimensions /...
[ [ 8, 0, 0.0443, 0.0253, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0759, 0.0127, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0886, 0.0127, 0, 0.66,...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import pyglet", "from graphics_common import *", "__noninteractive = True", "class TEST_CASE(unittest.TestCase):\n def check(self, expected, result, dimensions):\n if len(expected) != len(result) ...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import pyglet from graphics_common import * __noninteractive = True class TEST_CASE(unittest.TestCase): def check(self, expected, result, dimensions): if len(expected) != len(result) * dimensions /...
[ [ 8, 0, 0.0449, 0.0256, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0769, 0.0128, 0, 0.66, 0.125, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0897, 0.0128, 0, 0.66,...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "import unittest", "import pyglet", "from graphics_common import *", "__noninteractive = True", "class TEST_CASE(unittest.TestCase):\n def check(self, expected, result, dimensions):\n if len(expected) != len(result) ...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' from operator import add import random from pyglet.gl import * n_vertices = 42 v3f_data = [v/float(n_vertices*3 + 10) for v in range(n_vertices * 3)] v2f_data = reduce(add, zip(v3f_data[::3], v3f_data[1::3])) c4f_data = [v/floa...
[ [ 8, 0, 0.0538, 0.0308, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0923, 0.0154, 0, 0.66, 0.0435, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1077, 0.0154, 0, 0.66...
[ "'''\n'''", "__docformat__ = 'restructuredtext'", "__version__ = '$Id: $'", "from operator import add", "import random", "from pyglet.gl import *", "n_vertices = 42", "v3f_data = [v/float(n_vertices*3 + 10) for v in range(n_vertices * 3)]", "v2f_data = reduce(add, zip(v3f_data[::3], v3f_data[1::3]))...
#!/usr/bin/python # $Id:$ import unittest import pyglet from graphics_common import * __noninteractive = True class TEST_CASE(unittest.TestCase): def check(self, expected, result, dimensions): if len(expected) != len(result) * dimensions / 4: self.fail('Incorrect number of vertices in feedb...
[ [ 1, 0, 0.0548, 0.0137, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0822, 0.0137, 0, 0.66, 0.2, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.1096, 0.0137, 0, 0.66,...
[ "import unittest", "import pyglet", "from graphics_common import *", "__noninteractive = True", "class TEST_CASE(unittest.TestCase):\n def check(self, expected, result, dimensions):\n if len(expected) != len(result) * dimensions / 4:\n self.fail('Incorrect number of vertices in feedback...
#!/usr/bin/python # $Id:$ import unittest import pyglet from graphics_common import * __noninteractive = True class TEST_CASE(unittest.TestCase): def check(self, expected, result, dimensions): if len(expected) != len(result) * dimensions / 4: self.fail('Incorrect number of vertices in feedb...
[ [ 1, 0, 0.0556, 0.0139, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0833, 0.0139, 0, 0.66, 0.2, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.1111, 0.0139, 0, 0.66,...
[ "import unittest", "import pyglet", "from graphics_common import *", "__noninteractive = True", "class TEST_CASE(unittest.TestCase):\n def check(self, expected, result, dimensions):\n if len(expected) != len(result) * dimensions / 4:\n self.fail('Incorrect number of vertices in feedback...
#!/usr/bin/env python '''Draws a full-window quad with two texture units enabled and multi texcoords. Texture unit 0 is a checker pattern of yellow and cyan with env mode replace. Texture unit 1 is a checker pattern of cyan and yellow, with env mode modulate. The result should be flat green (with some variation in ...
[ [ 8, 0, 0.0987, 0.1316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1842, 0.0132, 0, 0.66, 0.1667, 352, 1, 0, 0, 0, 0, 4, 0 ], [ 1, 0, 0.2105, 0.0132, 0, 0.66,...
[ "'''Draws a full-window quad with two texture units enabled and multi\ntexcoords. Texture unit 0 is a checker pattern of yellow and cyan with\nenv mode replace. Texture unit 1 is a checker pattern of cyan and yellow,\nwith env mode modulate. The result should be flat green (with some variation\nin the center cro...
#!/usr/bin/python # $Id:$ '''OpenGL viewports and projections. This is a simplified interface for setting up projections, and viewports within projections. A `Viewport` is a rectangular area in space that can be rendered into. Most viewports, with the exception of the top-level viewport, belong to an owning project...
[ [ 8, 0, 0.1975, 0.3503, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3822, 0.0064, 0, 0.66, 0.1429, 531, 0, 1, 0, 0, 531, 0, 0 ], [ 3, 0, 0.3981, 0.0127, 0, 0.66...
[ "'''OpenGL viewports and projections.\n\nThis is a simplified interface for setting up projections, and viewports\nwithin projections.\n\nA `Viewport` is a rectangular area in space that can be rendered into. Most\nviewports, with the exception of the top-level viewport, belong to an owning\nprojection. A `Project...