libsdl Validation
Port build from safelibs/port-libsdl at commit f2d5e3959e25 (release build-f2d5e3959e25)
Tests
Dummy audio queue behavior Original / libsdl / dummy-audio-queue Passed
Headless event timer behavior Original / libsdl / headless-event-timer Passed
Installed SDL test binary Original / libsdl / installed-test-binary Passed
Surface pixel format blit Original / libsdl / surface-blit-pixel-format Passed
SDL version query compile Original / libsdl / version-query-compile Passed
Pygame alpha blit Original / libsdl / usage-python3-pygame-alpha-blit Passed
Pygame audio dummy Original / libsdl / usage-python3-pygame-audio-dummy Passed
pygame Clock.get_fps over multiple ticks Original / libsdl / usage-python3-pygame-clock-get-fps Passed
Drives pygame.time.Clock through twelve tick(50) iterations and verifies get_fps returns a finite nonnegative value, get_time stays small and nonnegative, and the cumulative wall time is close to the expected 12 * 20 ms budget.
pygame Clock get_rawtime and get_time Original / libsdl / usage-python3-pygame-clock-rawtime-gettime Passed
Drives a pygame.time.Clock through two ticks separated by a small delay and verifies that get_rawtime and get_time both return non-negative integers and that get_time is at least as large as get_rawtime.
Pygame clock tick Original / libsdl / usage-python3-pygame-clock-tick Passed
pygame Color.correct_gamma curve Original / libsdl / usage-python3-pygame-color-correct-gamma Passed
Applies pygame.Color.correct_gamma at gamma 2.2 to a midtone color and verifies the resulting channel values monotonically lower the input while preserving the alpha channel.
Pygame Color hex parsing Original / libsdl / usage-python3-pygame-color-hex-parse Passed
Constructs a pygame.Color from a hex string ("#FF0000") and confirms the resulting RGBA channel values.
pygame color HSLA Original / libsdl / usage-python3-pygame-color-hsla-batch11 Passed
Pygame Color HSV round trip Original / libsdl / usage-python3-pygame-color-hsv-roundtrip Passed
Reads the hsva attribute of a known RGB color and round trips through hsva assignment to verify the resulting RGB stays close to the original.
pygame color HSVA Original / libsdl / usage-python3-pygame-color-hsva Passed
Pygame color lerp Original / libsdl / usage-python3-pygame-color-lerp Passed
pygame Color.normalize float channels Original / libsdl / usage-python3-pygame-color-normalize Passed
Constructs a pygame.Color from 8-bit RGBA components and confirms Color.normalize returns the matching unit-interval floats with each component equal to the integer divided by 255.
pygame Color tuple/iter conversion Original / libsdl / usage-python3-pygame-color-tuple-iter Passed
Iterates a pygame.Color directly, converts it to tuple/list, and indexes channels by position to verify the RGBA sequence interface matches the named attributes.
Pygame cursors thickarrow_strings Original / libsdl / usage-python3-pygame-cursors-arrow-string Passed
Validates pygame.cursors.thickarrow_strings is a 24-line string tuple with width divisible by 8 and that pygame.cursors.compile() returns same-length data and mask buffers, exercising the SDL string-cursor compilation path. (pygame 2.x replaced cursors.arrow with a Cursor object; the tuple-of-strings shape now lives in thickarrow_strings and siblings.)
pygame cursors.compile Original / libsdl / usage-python3-pygame-cursors-compile Passed
Compiles an 8x8 ASCII cursor strings tuple via pygame.cursors.compile and verifies the resulting data and mask byte tuples are non-empty and have the expected length.
Pygame custom event Original / libsdl / usage-python3-pygame-custom-event Passed
pygame display caption Original / libsdl / usage-python3-pygame-display-caption Passed
pygame display get driver Original / libsdl / usage-python3-pygame-display-get-driver Passed
Opens a dummy pygame display surface and verifies pygame reports the configured dummy display backend.
Pygame display list_modes under dummy Original / libsdl / usage-python3-pygame-display-list-modes-dummy Passed
Calls pygame.display.list_modes() under the dummy video driver and verifies it returns either -1 or a list of (w, h) pairs with positive dimensions.
Pygame display set mode Original / libsdl / usage-python3-pygame-display-set-mode Passed
Creates a dummy SDL display surface through Pygame and verifies the requested window dimensions.
pygame draw aacircle anti-aliased Original / libsdl / usage-python3-pygame-draw-aacircle Passed
Draws an anti-aliased circle via pygame.draw.aacircle (or falls back to circle on older pygame), saves the surface as BMP, verifies the BM magic, and confirms a non-background pixel exists on the rim.
pygame draw aaline Original / libsdl / usage-python3-pygame-draw-aaline Passed
pygame draw aapolygon anti-aliased Original / libsdl / usage-python3-pygame-draw-aapolygon Passed
Draws an anti-aliased polygon via pygame.draw.aapolygon (or falls back to polygon outline on older pygame), saves it as BMP, verifies the BM magic, and confirms at least one non-background pixel was rendered.
pygame draw arc Original / libsdl / usage-python3-pygame-draw-arc Passed
pygame draw circle Original / libsdl / usage-python3-pygame-draw-circle-batch11 Passed
pygame.draw.circle quadrant flags Original / libsdl / usage-python3-pygame-draw-circle-quadrants Passed
Draws a single quadrant of a circle using the draw_top_right keyword on pygame.draw.circle and confirms pixels in the targeted quadrant are colored while the opposite quadrant remains background.
pygame draw circle width parameter ring Original / libsdl / usage-python3-pygame-draw-circle-ring Passed
Draws a circle with a non-zero width to produce a ring on a pygame surface, saves it as BMP, verifies the BM magic bytes, and confirms the centre pixel stays unfilled while the rim pixel is painted.
Pygame draws circle Original / libsdl / usage-python3-pygame-draw-circle Passed
Pygame draws ellipse Original / libsdl / usage-python3-pygame-draw-ellipse Passed
Pygame draws line Original / libsdl / usage-python3-pygame-draw-line Passed
Pygame draw lines open polyline Original / libsdl / usage-python3-pygame-draw-lines-open Passed
Draws an open multi-segment polyline with pygame.draw.lines (closed=False) and confirms intermediate edges are colored while the implicit closing edge is left untouched.
Pygame draw lines polyline Original / libsdl / usage-python3-pygame-draw-lines-polyline Passed
Draws a multi-segment polyline with pygame.draw.lines and verifies pixels along each segment carry the requested color.
pygame draw polygon filled vs outline Original / libsdl / usage-python3-pygame-draw-polygon-outline Passed
Draws the same triangle once filled (width=0) and once as an outline (width=1) on separate pygame surfaces, asserts that the filled surface paints its interior pixel while the outline-only surface leaves it unfilled but paints an edge pixel, and saves the outline result as BMP with BM magic verified.
Pygame draws polygon Original / libsdl / usage-python3-pygame-draw-polygon Passed
Pygame draw rect with border radius Original / libsdl / usage-python3-pygame-draw-rect-border-radius Passed
Draws a filled rounded rectangle and verifies that the rounded corner pixel is transparent while the center pixel carries the fill color.
Pygame draw rect with RGBA color Original / libsdl / usage-python3-pygame-draw-rect-rgba Passed
Draws a filled rectangle on an SRCALPHA Pygame surface using a 4-tuple RGBA color and verifies the alpha channel is preserved at the painted pixel.
Pygame draw rect Original / libsdl / usage-python3-pygame-draw-rect Passed
pygame event clear Original / libsdl / usage-python3-pygame-event-clear Passed
pygame custom event type Original / libsdl / usage-python3-pygame-event-custom-type-batch11 Passed
pygame event name keydown Original / libsdl / usage-python3-pygame-event-name-keydown Passed
Looks up the pygame event name for KEYDOWN and verifies the returned label identifies a key event.
Pygame event peek Original / libsdl / usage-python3-pygame-event-peek Passed
pygame event.post and event.get loop Original / libsdl / usage-python3-pygame-event-post-get-loop Passed
Posts several distinct USEREVENT-derived events into the pygame queue and drains them through pygame.event.get to verify FIFO order and that custom payload attributes round-trip intact.
Pygame event pump on empty queue Original / libsdl / usage-python3-pygame-event-pump-empty Passed
Pumps the Pygame event loop with no input under the dummy SDL driver and confirms get() returns no events and poll() reports NOEVENT.
Pygame event queue Original / libsdl / usage-python3-pygame-event-queue Passed
pygame event set_allowed and get_blocked Original / libsdl / usage-python3-pygame-event-set-allowed Passed
Blocks an event type, then allows it again via pygame.event.set_allowed and verifies pygame.event.get_blocked round-trips through both states.
pygame event set blocked Original / libsdl / usage-python3-pygame-event-set-blocked Passed
pygame Font bold and italic toggles Original / libsdl / usage-python3-pygame-font-bold-italic-flags Passed
Drives pygame.font.Font.set_bold/set_italic and confirms get_bold/get_italic round-trip the toggles, and that enabling italic strictly widens a rendered glyph compared to italic-off rendering.
pygame Font get_height for default font Original / libsdl / usage-python3-pygame-font-get-height Passed
Initialises pygame.font with the default SysFont, queries Font.get_height(), and verifies it is a positive integer not smaller than the linesize-derived ascent.
pygame font init/get_init/quit cycle Original / libsdl / usage-python3-pygame-font-init-quit-cycle Passed
Cycles pygame.font.init and pygame.font.quit, asserting pygame.font.get_init transitions between True and False at each step.
pygame font linesize Original / libsdl / usage-python3-pygame-font-linesize Passed
Queries a pygame font line size and verifies it is positive and at least as tall as the font height.
Pygame font metrics Original / libsdl / usage-python3-pygame-font-metrics Passed
Pygame font module Original / libsdl / usage-python3-pygame-font-module Passed
pygame font render size Original / libsdl / usage-python3-pygame-font-render-size-batch11 Passed
Pygame font render Original / libsdl / usage-python3-pygame-font-render Passed
pygame font size Original / libsdl / usage-python3-pygame-font-size Passed
Pygame font SysFont fallback Original / libsdl / usage-python3-pygame-font-sysfont Passed
Calls pygame.font.SysFont with a likely-missing family name and verifies pygame falls back to a usable Font object that can still render text.
Pygame image tostring frombytes roundtrip Original / libsdl / usage-python3-pygame-image-frombytes-roundtrip Passed
Serializes a Pygame surface to RGB bytes and rebuilds it via pygame.image.frombytes, verifying dimensions and byte length match.
Pygame image fromstring Original / libsdl / usage-python3-pygame-image-fromstring Passed
pygame.image JPEG save and reload Original / libsdl / usage-python3-pygame-image-jpg-roundtrip Passed
Saves a 16x16 solid-color surface to a JPEG file via pygame.image.save and reloads it, confirming the file begins with the JPEG SOI marker and that the decoded pixel color stays close to the source within JPEG quantization tolerance.
Pygame image load BMP roundtrip Original / libsdl / usage-python3-pygame-image-load-bmp-roundtrip Passed
Saves a small Pygame surface as BMP and reloads it via pygame.image.load, verifying BM magic and matching dimensions.
Pygame image load Original / libsdl / usage-python3-pygame-image-load Passed
pygame image PNG roundtrip Original / libsdl / usage-python3-pygame-image-roundtrip-png-batch11 Passed
pygame image save BMP Original / libsdl / usage-python3-pygame-image-save-bmp Passed
Saves a pygame surface as BMP, verifies the file begins with the BM magic bytes, and reloads it to confirm the original dimensions.
Pygame image save PNG header Original / libsdl / usage-python3-pygame-image-save-png-header Passed
Saves a pygame surface as PNG, checks the on-disk PNG signature bytes, and reloads the file to confirm the original pixel color survives the round trip.
Pygame image save Original / libsdl / usage-python3-pygame-image-save Passed
Pygame image tobytes Original / libsdl / usage-python3-pygame-image-tobytes Passed
Serializes a small Surface with pygame.image.tobytes in RGB and RGBA modes and verifies byte-string lengths match width*height*channels.
Pygame image tostring Original / libsdl / usage-python3-pygame-image-tostring Passed
pygame.joystick init with no devices Original / libsdl / usage-python3-pygame-joystick-empty-init Passed
Initializes pygame.joystick under the headless SDL dummy driver where no input devices are present, then confirms get_init returns True, get_count is zero, instantiating Joystick(0) raises an error, and joystick.quit cleanly tears the subsystem down.
Pygame key event dispatch Original / libsdl / usage-python3-pygame-key-event Passed
pygame key.get_focused Original / libsdl / usage-python3-pygame-key-get-focused Passed
Initializes a pygame display with the dummy driver and confirms pygame.key.get_focused returns a boolean-typed value queryable without error.
Pygame key get_pressed length Original / libsdl / usage-python3-pygame-key-get-pressed-length Passed
Calls pygame.key.get_pressed() under the dummy driver and verifies the returned ScancodeWrapper is non-empty and reports no keys held.
pygame.key modifier state and name lookup Original / libsdl / usage-python3-pygame-key-mod-state Passed
After display init under the dummy driver, queries pygame.key.get_mods plus pygame.key.name and pygame.key.key_code for several constants to confirm modifier state is an integer with no modifiers held and that name/key_code form a round-trip for known keys.
pygame key.name returns "a" for K_a Original / libsdl / usage-python3-pygame-key-name-a Passed
Calls pygame.key.name(K_a) and verifies it returns the string "a", and that K_RETURN maps to a non-empty descriptive name.
pygame mask bounding rects Original / libsdl / usage-python3-pygame-mask-bounding-rects Passed
Builds a pygame mask with a small connected region and verifies get_bounding_rects returns at least one bounding rectangle of nonzero width.
pygame mask centroid Original / libsdl / usage-python3-pygame-mask-centroid Passed
Marks a single opaque pixel in a pygame mask and verifies mask.centroid reports its exact coordinates.
Pygame mask collision Original / libsdl / usage-python3-pygame-mask-collision Passed
pygame mask connected components Original / libsdl / usage-python3-pygame-mask-connected-components-batch11 Passed
pygame mask count tenth Original / libsdl / usage-python3-pygame-mask-count-tenth Passed
Sets two pixels on a pygame mask in the tenth batch and verifies mask.count returns the exact number of set bits.
Pygame mask count Original / libsdl / usage-python3-pygame-mask-count Passed
Pygame mask from_surface density Original / libsdl / usage-python3-pygame-mask-from-surface-density Passed
Builds a checkerboard surface, calls pygame.mask.from_surface(), and confirms the mask reports exactly half of the pixels as set.
pygame Mask.from_surface get_at count centroid Original / libsdl / usage-python3-pygame-mask-from-surface-getat-bmp Passed
Builds a pygame Mask via Mask.from_surface from an alpha surface with a known opaque rectangle, asserts get_at hits, the total count, and the centroid, then saves the source surface to BMP and verifies the BM magic.
pygame mask from threshold Original / libsdl / usage-python3-pygame-mask-from-threshold Passed
pygame mask outline Original / libsdl / usage-python3-pygame-mask-outline Passed
Pygame mask overlap area Original / libsdl / usage-python3-pygame-mask-overlap-area Passed
pygame mixer get_init before and after init Original / libsdl / usage-python3-pygame-mixer-get-init-uninit Passed
Calls pygame.mixer.get_init both before and after initializing the mixer with the dummy driver, confirming None is returned uninitialized and a (frequency, format, channels) tuple after init.
Pygame mixer sound from buffer Original / libsdl / usage-python3-pygame-mixer-sound-buffer Passed
Initializes pygame.mixer with the dummy audio driver, constructs a Sound from a raw PCM buffer, and verifies the reported length and sample count match the input.
Pygame mouse event Original / libsdl / usage-python3-pygame-mouse-event Passed
pygame mouse.get_pressed Original / libsdl / usage-python3-pygame-mouse-get-pressed Passed
Pumps the pygame event queue with the dummy video driver and confirms pygame.mouse.get_pressed returns a tuple of three button states with no buttons currently held down.
pygame PixelArray slice indexing Original / libsdl / usage-python3-pygame-pixelarray-slice-indexing Passed
Creates a PixelArray view over a pygame surface, fills a column with a mapped colour using slice indexing, releases the array, and verifies each pixel in that column matches via Surface.get_at.
Pygame pixelarray write Original / libsdl / usage-python3-pygame-pixelarray Passed
Pygame Color.grayscale luminance conversion Original / libsdl / usage-python3-pygame-r10-color-grayscale Passed
Converts a saturated RGB Color to grayscale via Color.grayscale and verifies the resulting components are equal and within the expected luminance range.
Pygame Mask.fill and Mask.clear toggle every bit Original / libsdl / usage-python3-pygame-r10-mask-fill-clear Passed
Creates a mask, calls fill() and clear(), and verifies count() reaches the full size and zero respectively.
Pygame Mask.invert flips every bit Original / libsdl / usage-python3-pygame-r10-mask-invert Passed
Sets a subset of bits in a mask, calls invert(), and verifies the previously unset bits are now set and previously set bits are clear.
Pygame Rect.clipline trims line to rect bounds Original / libsdl / usage-python3-pygame-r10-rect-clipline Passed
Clips a line that crosses a Rect against the Rect bounds and verifies the returned endpoints sit on the Rect's edges.
Pygame Rect.collidelistall returns all overlapping indices Original / libsdl / usage-python3-pygame-r10-rect-collidelistall Passed
Builds a list of Rects and verifies Rect.collidelistall returns every index whose rect intersects the probe.
Pygame LayeredUpdates respects per-sprite z-order Original / libsdl / usage-python3-pygame-r10-sprite-layered-updates Passed
Adds three sprites to a LayeredUpdates group with explicit layers and verifies sprites() returns them in ascending layer order.
Pygame time.set_timer with explicit loop count Original / libsdl / usage-python3-pygame-r10-time-set-timer-loops Passed
Schedules a USEREVENT timer with loops=3 and verifies exactly three events arrive on the queue before it stops.
Pygame Vector2 as_polar / from_polar roundtrip Original / libsdl / usage-python3-pygame-r10-vector2-as-polar Passed
Converts a Vector2 to polar (r, theta), reconstructs via from_polar, and verifies the roundtrip recovers the original cartesian coordinates.
Pygame Vector2.cross returns scalar 2D cross product Original / libsdl / usage-python3-pygame-r10-vector2-cross-scalar Passed
Computes the 2D cross product via Vector2.cross and verifies sign and magnitude against the analytic value (x1*y2 - y1*x2).
Pygame Vector3.elementwise multiplication Original / libsdl / usage-python3-pygame-r10-vector3-elementwise-mul Passed
Performs an elementwise (Hadamard) product between two Vector3 instances and verifies each component matches the per-axis product.
Pygame Color.cmy reports CMY tuple for primary colors Original / libsdl / usage-python3-pygame-r11-color-cmy-property Passed
Reads Color.cmy on red and white and verifies the cyan/magenta/yellow components match the printing-press complement of RGB.
Pygame Color.update mutates RGBA components in place Original / libsdl / usage-python3-pygame-r11-color-update-rgba Passed
Calls Color.update with explicit r/g/b/a values and verifies the same Color instance now reports the new tuple via iteration.
Pygame Mask.scale doubles dimensions and bit count Original / libsdl / usage-python3-pygame-r11-mask-scale-double Passed
Builds a fully-filled 4x4 Mask, scales it to 8x8 with Mask.scale, and verifies both the new size and that all 64 bits remain set.
Pygame Rect.scale_by doubles dimensions while keeping center Original / libsdl / usage-python3-pygame-r11-rect-scale-by Passed
Calls Rect.scale_by(2.0) and verifies the returned rect has doubled width/height while preserving the original center.
Pygame Rect.unionall returns bounding rect of a list Original / libsdl / usage-python3-pygame-r11-rect-unionall-list Passed
Calls Rect.unionall on a list of three disjoint rects spanning a 30x30 area and confirms the result equals (0,0,30,30).
Pygame Surface.premul_alpha multiplies RGB channels by alpha Original / libsdl / usage-python3-pygame-r11-surface-premul-alpha Passed
Fills an SRCALPHA surface with (200, 100, 50, 128), calls premul_alpha, and verifies each RGB channel is multiplied by alpha/255.
Pygame surfarray.array_red extracts the red channel only Original / libsdl / usage-python3-pygame-r11-surfarray-array-red Passed
Fills a 2x2 surface with (100, 50, 25) and verifies surfarray.array_red returns a 2x2 array where every entry equals 100.
Pygame transform.average_surfaces blends two solid colors Original / libsdl / usage-python3-pygame-r11-transform-average-surfaces Passed
Calls transform.average_surfaces on two solid-red surfaces with intensities 100 and 50 and verifies the result is the per-channel mean (75, 0, 0).
Pygame transform.laplacian preserves surface geometry Original / libsdl / usage-python3-pygame-r11-transform-laplacian-shape Passed
Calls transform.laplacian on a 16x12 uniform-fill surface and verifies the result keeps the same dimensions while collapsing the interior to zero gradient.
Pygame Vector2.move_towards advances by fixed step toward target Original / libsdl / usage-python3-pygame-r11-vector2-move-towards Passed
Calls Vector2.move_towards from origin toward (10, 0) with step 3 and confirms the result is exactly (3, 0).
Pygame draw.circle fills the center pixel with the requested color Original / libsdl / usage-python3-pygame-r12-draw-circle-fills-center-pixel Passed
Draws a filled circle of radius 4 centered at (8, 8) on a black 16x16 surface and asserts get_at at the center returns the requested fill color.
Pygame draw.line paints both endpoint pixels with the line color Original / libsdl / usage-python3-pygame-r12-draw-line-endpoint-pixel Passed
Draws a horizontal line on a black surface from (2, 4) to (10, 4) and asserts get_at at both endpoints returns the line color while a pixel above the line stays black.
Pygame Font.size returns positive width and height for non-empty text Original / libsdl / usage-python3-pygame-r12-font-size-returns-positive Passed
Constructs the default Font at size 16 and asserts Font.size for a multi-character string returns positive integer width and height greater than zero.
Pygame image.frombuffer round-trips bytes back to the original pixels Original / libsdl / usage-python3-pygame-r12-image-frombuffer-roundtrip Passed
Builds a 2x2 RGB byte buffer, constructs a Surface via pygame.image.frombuffer, and asserts each pixel reads back to the matching RGB triple.
Pygame Mask.overlap returns None for disjoint mask regions Original / libsdl / usage-python3-pygame-r12-mask-overlap-disjoint Passed
Builds two filled 4x4 masks and calls overlap with an offset that places them in non-overlapping positions, asserting overlap returns None.
Pygame sprite.Group len reflects added and removed sprites Original / libsdl / usage-python3-pygame-r12-sprite-group-len Passed
Creates a Group, adds three Sprite instances, removes one, and asserts len(group) tracks the membership transitions correctly.
Pygame Surface.blit copies a pixel from a source surface to a destination Original / libsdl / usage-python3-pygame-r12-surface-blit-copy-pixel Passed
Creates a 4x4 source filled red and a 4x4 destination filled blue, blits the source at (0,0), and asserts the destination pixel matches red while a non-overlapping region remains blue.
Pygame Surface set_at and get_at round-trip an RGBA pixel Original / libsdl / usage-python3-pygame-r12-surface-set-at-get-at-roundtrip Passed
Creates an SRCALPHA Surface, writes a known RGBA color with set_at at (3,2), and asserts get_at returns the same 4-tuple.
Pygame transform.rotate by 90 degrees swaps width and height Original / libsdl / usage-python3-pygame-r12-transform-rotate-90-swaps-dims Passed
Rotates a 6x4 surface by 90 degrees with pygame.transform.rotate and asserts the resulting surface size is (4, 6).
Pygame transform.scale produces a surface with the requested target size Original / libsdl / usage-python3-pygame-r12-transform-scale-target-size Passed
Calls pygame.transform.scale on a 4x4 surface to (16, 8) and asserts the returned surface get_size matches the target dimensions.
Pygame cursors.compile encodes an 8x8 ASCII cursor into matching mask bytes Original / libsdl / usage-python3-pygame-r13-cursors-compile-arrow-shape Passed
Calls pygame.cursors.compile on an 8x8 ASCII cursor with both 'X' and '.' glyph rows, and asserts the returned data and mask sequences each contain exactly 8 byte entries (one per row of the 8-pixel-tall cursor).
Pygame event.post enqueues a custom event that event.get returns intact Original / libsdl / usage-python3-pygame-r13-event-post-get-roundtrip Passed
Allocates a custom event type via pygame.event.custom_type, posts an Event carrying a payload dict, and asserts event.get returns exactly one Event with the matching type and payload attribute.
Pygame key.get_pressed returns a sequence indexable by SDL scancodes Original / libsdl / usage-python3-pygame-r13-key-get-pressed-length Passed
Initializes a dummy display, calls pygame.event.pump and pygame.key.get_pressed, asserts the returned sequence has positive length and that probing a known scancode (K_a) does not raise and returns a boolean-ish value.
Pygame mixer.init reports a positive frequency under the dummy audio driver Original / libsdl / usage-python3-pygame-r13-mixer-init-with-dummy-driver Passed
Initializes pygame.mixer under SDL_AUDIODRIVER=dummy, asserts get_init returns a non-None tuple whose frequency is > 0 and channel count is in {1,2}, then quits the mixer cleanly.
Pygame Rect.clip returns the intersection of two overlapping rectangles Original / libsdl / usage-python3-pygame-r13-rect-clip-intersection Passed
Builds two overlapping rectangles, computes Rect.clip, and asserts the resulting Rect represents their intersection at the expected position and size.
Pygame Rect.collidepoint includes the top-left corner and excludes the bottom-right Original / libsdl / usage-python3-pygame-r13-rect-collidepoint-edges Passed
Builds a Rect at (10,20) sized 30x40 and asserts collidepoint returns True for the top-left corner and an interior point, but False for the exclusive bottom-right corner per Pygame's half-open rect convention.
Pygame Rect.inflate grows symmetrically around the original center Original / libsdl / usage-python3-pygame-r13-rect-inflate-grows-around-center Passed
Inflates a 10x10 Rect by (4,6), asserting the resulting size grew by the requested amounts and the center stayed the same as the source rectangle.
Pygame Rect.union returns the bounding rectangle of two inputs Original / libsdl / usage-python3-pygame-r13-rect-union-bounding-box Passed
Builds two disjoint rectangles, calls Rect.union, and asserts the resulting rectangle spans both extents with the expected top-left corner and dimensions.
Pygame Vector2.distance_to returns the Euclidean distance between two points Original / libsdl / usage-python3-pygame-r13-vector2-distance-to Passed
Builds Vector2(0,0) and Vector2(3,4), asserts distance_to returns 5.0 (3-4-5 triangle), and that distance_squared_to returns 25.0 for the same pair.
Pygame Vector3 length and length_squared compute the 3D Euclidean norm Original / libsdl / usage-python3-pygame-r13-vector3-magnitude Passed
Builds Vector3(2,3,6), asserts length_squared returns 49.0 and length returns 7.0 (the 2-3-6-7 Pythagorean quadruple), and that the magnitude alias agrees with length.
Pygame Color('red') exposes the canonical RGBA tuple (255, 0, 0, 255) Original / libsdl / usage-python3-pygame-r14-color-named-rgba-fields Passed
Constructs pygame.Color('red') and asserts the .r/.g/.b/.a fields are 255/0/0/255 respectively, and that tuple(color) equals (255, 0, 0, 255).
Pygame draw.aaline paints a non-background pixel at the start endpoint Original / libsdl / usage-python3-pygame-r14-draw-aaline-endpoint-painted Passed
Fills a 16x16 surface with black, draws an antialiased line from (2, 2) to (12, 12) in white via pygame.draw.aaline, and asserts the pixel at (2, 2) is no longer pure black (the AA line painted at least the starting endpoint).
Pygame draw.rect with width=1 strokes the border but leaves the interior unfilled Original / libsdl / usage-python3-pygame-r14-draw-rect-stroked-outline Passed
Fills a 16x16 surface with black, draws a (255,0,0) stroked rectangle (4,4,8,8) with width=1 via pygame.draw.rect, and asserts the corner pixel is red while the interior pixel at (8, 8) remains black.
Pygame font.Font(None, size).render returns a positively-sized Surface Original / libsdl / usage-python3-pygame-r14-font-render-default-produces-surface Passed
Initialises pygame.font, constructs Font(None, 18), renders the text 'r14' with antialias=True onto a black background, and asserts the returned Surface has positive width and height.
Pygame image.tostring + image.frombuffer round-trip preserves RGB pixels Original / libsdl / usage-python3-pygame-r14-image-tostring-frombuffer-roundtrip Passed
Builds a 3x2 surface with distinct per-pixel colours, exports it via pygame.image.tostring(format='RGB'), reconstructs a new surface via pygame.image.frombuffer with the same size and format, and asserts each pixel of the reconstructed surface matches the source pixel byte-for-byte.
Pygame Rect.normalize converts negative width/height to positive coordinates Original / libsdl / usage-python3-pygame-r14-rect-normalize-negative-dims Passed
Constructs pygame.Rect(10, 10, -4, -3), calls .normalize(), and asserts the resulting topleft is (6, 7) and size is (4, 3) — the rectangle is moved so its origin is the top-left and the dimensions are positive.
Pygame Surface.subsurface shares pixel storage with the parent Original / libsdl / usage-python3-pygame-r14-surface-subsurface-shares-pixels Passed
Creates a 10x10 parent surface filled with black, slices a 4x4 subsurface at offset (2, 2), draws a single white pixel at the subsurface origin, and asserts the parent surface reads white at the corresponding parent coordinate (2, 2).
Pygame transform.average_color returns the fill colour for a uniform surface Original / libsdl / usage-python3-pygame-r14-transform-average-color-uniform-fill Passed
Fills a 4x4 surface with (12, 34, 56) and asserts pygame.transform.average_color returns the matching RGB triple.
Pygame transform.flip preserves surface dimensions for both axes Original / libsdl / usage-python3-pygame-r14-transform-flip-preserves-shape Passed
Builds an 8x5 surface, calls pygame.transform.flip with flip_x=True/flip_y=False then with flip_x=False/flip_y=True, and asserts both flipped surfaces have the same (8, 5) size as the source.
Pygame transform.smoothscale_by doubles surface dimensions with factor 2.0 Original / libsdl / usage-python3-pygame-r14-transform-smoothscale-by-doubles Passed
Builds a 4x3 RGB surface, calls pygame.transform.smoothscale_by with factor 2.0, and asserts the resulting surface size is (8, 6).
Pygame Color.grayscale collapses RGB into a single luminance channel Original / libsdl / usage-python3-pygame-r15-color-grayscale-luminance Passed
Constructs pygame.Color(255, 0, 0) and calls .grayscale(), asserting the resulting Color has equal r, g, b channels (greyscale invariant) and an unchanged alpha of 255.
Pygame event.post then event.get returns the user-event with original attributes Original / libsdl / usage-python3-pygame-r15-event-post-custom-roundtrip Passed
Allocates a custom user event type via pygame.event.custom_type, posts an Event with attribute payload='r15', and asserts pygame.event.get returns at least one event matching the custom type whose payload attribute equals 'r15'.
Pygame font.Font.render returns a Surface whose size matches font.size Original / libsdl / usage-python3-pygame-r15-font-render-produces-surface-with-size Passed
Initializes pygame.font, builds the default Font at size 18, calls font.size('R15') for the expected dimensions and font.render('R15', True, white) for the actual surface, and asserts the rendered surface size matches the size() reading.
Pygame image.save then image.load round-trips a BMP surface byte-for-byte Original / libsdl / usage-python3-pygame-r15-image-save-load-bmp-roundtrip Passed
Builds a 4x3 surface, writes solid green pixels via fill, saves to BMP, reloads via image.load, and asserts the reloaded surface dimensions match and a probe pixel still reads (0, 200, 0).
Pygame Mask.fill sets every bit so count equals width * height Original / libsdl / usage-python3-pygame-r15-mask-fill-count-equals-area Passed
Constructs a pygame.Mask of size (7, 5), calls .fill(), and asserts .count() returns 35 (== 7 * 5), confirming all bits are set after fill.
Pygame Rect.move returns a new Rect with the offset applied to topleft and unchanged size Original / libsdl / usage-python3-pygame-r15-rect-move-shifts-topleft Passed
Builds Rect(5, 6, 8, 9), calls .move(3, 4), and asserts the resulting Rect has topleft (8, 10), size (8, 9) and that the original rectangle is left unchanged at topleft (5, 6).
Pygame sprite.Group reports len equal to the number of added sprites Original / libsdl / usage-python3-pygame-r15-sprite-group-add-len Passed
Constructs three pygame.sprite.Sprite instances, adds them to a sprite.Group, and asserts len(group) is 3 and that each sprite is reported as alive after add.
Pygame Surface.fill paints every probed pixel with the requested RGB color Original / libsdl / usage-python3-pygame-r15-surface-fill-solid-color Passed
Creates a 6x4 surface, calls fill((30, 60, 90)), and asserts get_at on three sampled pixels (corner, center, far corner) returns RGB (30, 60, 90) confirming a uniform fill.
Pygame transform.scale resizes a surface to the requested target dimensions Original / libsdl / usage-python3-pygame-r15-transform-scale-target-dimensions Passed
Builds an 8x4 source surface, calls pygame.transform.scale(src, (16, 12)), and asserts the resulting surface has size exactly (16, 12), confirming the explicit target dimensions are honored.
Pygame Vector2 addition adds components and preserves operand types Original / libsdl / usage-python3-pygame-r15-vector2-add-componentwise Passed
Constructs Vector2(3, 4) and Vector2(1, 2), computes their sum, and asserts the result has x=4.0 and y=6.0 with type Vector2; the source vectors retain their original components.
Pygame Color constructed from the named string "red" reports RGB (255, 0, 0) Original / libsdl / usage-python3-pygame-r16-color-from-string-red Passed
Constructs pygame.Color("red") and asserts the resulting Color's (r, g, b) tuple equals (255, 0, 0) — pinning the named-color lookup path on Ubuntu 24.04 python3-pygame.
Pygame display.set_mode under Xvfb returns a Surface with requested dimensions Original / libsdl / usage-python3-pygame-r16-display-set-mode-dimensions Passed
Calls pygame.display.set_mode((160, 120)) under xvfb-run and asserts the returned Surface reports get_size() == (160, 120) — exercising the live SDL display path rather than the dummy driver.
Pygame draw.rect paints the interior of a rect to the requested color Original / libsdl / usage-python3-pygame-r16-draw-rect-fills-region Passed
Creates a 16x16 Surface filled black, calls pygame.draw.rect with color (200, 50, 25) over a (4,4,8,8) rect, and asserts get_at on a center pixel of the painted region (e.g. (8, 8)) returns RGB (200, 50, 25).
Pygame font.Font(None, 14).render("Ab") returns a Surface with positive area Original / libsdl / usage-python3-pygame-r16-font-render-surface-nontrivial Passed
Loads the default font at size 14, renders "Ab" with antialiasing off and color (255, 255, 255), and asserts the resulting Surface get_size() reports both width and height strictly greater than zero.
Pygame image.save PNG then image.load round-trips a 5x7 Surface size Original / libsdl / usage-python3-pygame-r16-image-load-png-roundtrip-dims Passed
Builds a 5x7 Surface, saves as PNG, reloads it, and asserts the reloaded Surface get_size() is (5, 7) — pinning the PNG codec dimensions round trip, distinct from the BMP r15 round trip.
Pygame image.tobytes then image.frombytes round-trips a small RGB Surface Original / libsdl / usage-python3-pygame-r16-image-tobytes-fromstring-roundtrip Passed
Builds a 4x3 RGB Surface with a known gradient, calls image.tobytes(surf, "RGB"), reconstructs via image.frombytes(data, (4,3), "RGB"), and asserts the reconstructed Surface get_at values match the original at three sampled pixels.
Pygame math.Vector2(3,4) dot (5,6) equals the known value 39 Original / libsdl / usage-python3-pygame-r16-math-vector2-dot-known Passed
Computes pygame.math.Vector2(3, 4).dot(Vector2(5, 6)) and asserts the result is exactly 39.0 — pinning the dot-product implementation on a small integer example.
Pygame sprite.Group add then empty zeroes the membership count Original / libsdl / usage-python3-pygame-r16-sprite-group-add-empty-count Passed
Creates three Sprite instances, adds them to a Group, asserts len(group) == 3, then calls group.empty() and asserts len(group) == 0 — pinning the empty()-clears-membership contract.
Pygame transform.flip horizontal applied twice returns the same pixel values Original / libsdl / usage-python3-pygame-r16-transform-flip-horizontal-roundtrip Passed
Builds a 4x4 Surface with a known gradient, flips horizontally twice via transform.flip(surf, True, False), and asserts the doubly-flipped Surface has identical get_at values to the original at every pixel.
Pygame transform.scale 2x produces a Surface with doubled dimensions Original / libsdl / usage-python3-pygame-r16-transform-scale-doubles-dims Passed
Builds an 8x4 Surface, calls pygame.transform.scale to (16, 8), and asserts the returned Surface reports get_size() == (16, 8) — pinning the explicit-size scale path.
Pygame cursors.compile on a small bitmap returns a 2-tuple of bytes Original / libsdl / usage-python3-pygame-r17-cursors-compile-returns-2-tuple Passed
Calls pygame.cursors.compile on a small uniform-width string cursor and asserts the return is a tuple of length 2, pinning the documented (data, mask) return shape.
Pygame draw.line midpoint pixel readback matches the requested colour Original / libsdl / usage-python3-pygame-r17-draw-line-midpoint-pixel-readback Passed
Draws a horizontal line on a black 11x11 Surface and asserts Surface.get_at on the midpoint returns the requested colour, pinning the basic line rasterisation path through SDL2's renderer-less Surface drawing.
Pygame font.SysFont falls back to default and returns a Font object Original / libsdl / usage-python3-pygame-r17-font-sysfont-fallback-returns-font Passed
Calls pygame.font.SysFont with a deliberately bogus family name and asserts the returned object is an instance of pygame.font.Font — exercising the system-font fallback path bundled with SDL_ttf.
Pygame image.save JPG round-trip preserves Surface dimensions Original / libsdl / usage-python3-pygame-r17-image-save-jpg-roundtrip-dims Passed
Creates an opaque RGB Surface, saves it as JPG via pygame.image.save, reloads it, and asserts get_size() matches the original — exercising the SDL_image JPG codec dimension fidelity.
Pygame mouse.set_visible(False) returns 1 (the previous visible state) Original / libsdl / usage-python3-pygame-r17-mouse-set-visible-returns-previous-state Passed
Creates a display under xvfb-run, calls pygame.mouse.set_visible(False), and asserts the return equals 1 — pinning the SDL convention that set_visible returns the prior boolean state as an int.
Pygame PixelArray.replace swaps a colour and Surface.get_at confirms the change Original / libsdl / usage-python3-pygame-r17-pixelarray-replace-roundtrip Passed
Fills a Surface with a known colour, opens a PixelArray, replaces it with a new colour, and asserts Surface.get_at((0,0)) reports the new colour — exercising direct pixel rewrite through pygame's PixelArray wrapper.
Pygame Surface.blit applied twice yields the source colour at the centre Original / libsdl / usage-python3-pygame-r17-surface-blit-twice-center-matches Passed
Blits a 4x4 coloured Surface onto a 16x16 base at the same offset twice and asserts Surface.get_at on the centre of the blitted area returns the source colour, exercising cumulative blits through SDL2.
Pygame Surface.set_alpha value is reflected by get_alpha Original / libsdl / usage-python3-pygame-r17-surface-set-alpha-getter-roundtrip Passed
Creates a Surface, calls set_alpha(128), and asserts get_alpha() returns 128, pinning the SDL alpha-property round trip via pygame.
Pygame Surface.subsurface within bounds returns the requested dimensions Original / libsdl / usage-python3-pygame-r17-surface-subsurface-roundtrip-dims Passed
Creates a 20x16 Surface, slices a (4,3)-(12,9) subsurface, and asserts get_size() returns (8, 6) — pinning the SDL-backed Surface region view dimensions.
Pygame image.tostring with RGB format yields w*h*3 bytes Original / libsdl / usage-python3-pygame-r18-image-tostring-rgb-length-matches Passed
Builds an 8x6 Surface, calls pygame.image.tostring(surf, "RGB"), and asserts the byte length equals 8*6*3 — pinning the SDL-backed pixel serialisation length contract for the RGB format.
Pygame Rect.collidepoint returns True for inside and False for outside Original / libsdl / usage-python3-pygame-r18-rect-collidepoint-inside-outside Passed
Builds a Rect at (10,20,30,40), asserts collidepoint((15,25)) is True and collidepoint((100,100)) is False, pinning the inclusive-left/exclusive-right Rect membership semantics on Ubuntu 24.04 pygame.
Pygame Rect.inflate expands width and height symmetrically Original / libsdl / usage-python3-pygame-r18-rect-inflate-grows-equally-each-side Passed
Inflates a Rect(10,20,30,40) by (10,20) and asserts the new rect is (5,10,40,60) — pinning that inflate distributes growth half on each side as documented.
Pygame Rect.move shifts position while preserving width and height Original / libsdl / usage-python3-pygame-r18-rect-move-preserves-size Passed
Moves a Rect(5,5,20,30) by (3,4) and asserts the result is (8,9,20,30), pinning that move returns a new Rect with shifted origin and unchanged size.
Pygame Rect.union produces the bounding rect covering both inputs Original / libsdl / usage-python3-pygame-r18-rect-union-spans-both-rects Passed
Computes Rect(0,0,10,10).union(Rect(5,5,20,20)) and asserts the union is (0,0,25,25), pinning the bounding-box union shape on Ubuntu 24.04 pygame.
Pygame Surface.fill colour reads back via get_at on multiple coordinates Original / libsdl / usage-python3-pygame-r18-surface-fill-then-get-at-roundtrip Passed
Fills a 6x6 Surface with (12,34,56) and asserts get_at returns the same RGB triple at three different coordinates, pinning the SDL surface fill + pixel readback round trip.
Pygame Surface.set_at writes a single pixel observable via get_at Original / libsdl / usage-python3-pygame-r18-surface-set-at-single-pixel-readback Passed
Fills an 8x8 Surface with a base colour, calls set_at((4,4),(200,100,50)) and asserts get_at((4,4)) returns the new colour while a neighbour at (4,5) keeps the base colour — pinning isolated pixel writes through SDL2.
Pygame time.Clock.tick returns a non-negative millisecond delta Original / libsdl / usage-python3-pygame-r18-time-clock-tick-returns-nonneg-ms Passed
Constructs a pygame.time.Clock and asserts the first tick(60) call returns a non-negative integer milliseconds-since-last-tick value, pinning the SDL-backed timer contract.
Pygame transform.flip horizontal mirrors a coloured-edge Surface Original / libsdl / usage-python3-pygame-r18-transform-flip-x-mirrors-pixels Passed
Sets the left column of a Surface to red, the right column to blue, calls pygame.transform.flip(s, True, False), and asserts the colours have swapped — pinning horizontal flip semantics through SDL2.
Pygame transform.scale doubles Surface dimensions to the requested size Original / libsdl / usage-python3-pygame-r18-transform-scale-doubles-dims Passed
Scales a 5x4 Surface to (10,8) via pygame.transform.scale and asserts get_size returns (10,8), pinning the explicit-target-size scaling contract through SDL2.
Pygame Color exposes r/g/b/a attributes in the expected channel order Original / libsdl / usage-python3-pygame-r19-color-rgb-channel-order Passed
Constructs pygame.Color(10,20,30,40) and asserts the .r, .g, .b, .a attributes are exactly 10, 20, 30, 40 respectively, pinning the documented channel-attribute order on Ubuntu 24.04 pygame.
Pygame image.save then image.load PNG preserves a sentinel pixel value Original / libsdl / usage-python3-pygame-r19-image-save-load-png-roundtrip-pixel Passed
Fills a 6x6 Surface with (42,84,168), saves to PNG via pygame.image.save, reloads via pygame.image.load, and asserts get_at(3,3) returns the same RGB triple, pinning the SDL_image PNG save/load round trip.
Pygame math.Vector2 dot product is zero for perpendicular vectors Original / libsdl / usage-python3-pygame-r19-math-vector2-dot-perpendicular Passed
Constructs Vector2(1,0) and Vector2(0,1) and asserts their dot product equals zero exactly, pinning the dot-product orthogonality result for axis-aligned unit vectors.
Pygame math.Vector2(3,4).length equals 5 by Pythagoras Original / libsdl / usage-python3-pygame-r19-math-vector2-length-pythagoras Passed
Constructs pygame.math.Vector2(3,4) and asserts length() returns 5.0 within 1e-9 tolerance, pinning the Euclidean magnitude computation in the vector module.
Pygame Rect.clamp keeps a smaller rect inside a larger bounding rect Original / libsdl / usage-python3-pygame-r19-rect-clamp-inside-larger-rect Passed
Calls Rect(100,100,10,10).clamp(Rect(0,0,50,50)) and asserts the clamped rect is positioned at (40,40,10,10), pinning the clamp-against-bounds semantics on Ubuntu 24.04 pygame.
Pygame Rect.contains reports True for a strictly enclosed Rect and False otherwise Original / libsdl / usage-python3-pygame-r19-rect-contains-strict-inside Passed
Builds an outer Rect(0,0,100,100) and asserts contains(Rect(10,10,50,50)) is True while contains(Rect(80,80,50,50)) is False, pinning the strict-inside Rect containment contract.
Pygame sprite.Group reports len equal to the number of added sprites Original / libsdl / usage-python3-pygame-r19-sprite-group-add-and-len Passed
Creates three pygame.sprite.Sprite instances with image+rect, adds them to a Group, and asserts len(group) is 3 and all sprites appear in the group's sprites() list, pinning the sprite-group membership API.
Pygame Surface.blit with source area selects only the requested subregion Original / libsdl / usage-python3-pygame-r19-surface-blit-area-source-subregion Passed
Fills two halves of an 8x4 source Surface (left red, right blue), blits onto a black destination with area=Rect(0,0,4,4) (left half only), and asserts the destination contains red and not blue, pinning the area-based subregion blit contract.
Pygame Surface.convert_alpha returns a SRCALPHA-flagged Surface Original / libsdl / usage-python3-pygame-r19-surface-convert-alpha-has-srcalpha Passed
Creates a display Surface on the dummy driver, calls convert_alpha on a freshly allocated Surface, and asserts the resulting Surface has the SRCALPHA flag bit set in get_flags, pinning the alpha-conversion contract.
Pygame transform.rotate 90 degrees swaps a non-square Surface's dimensions Original / libsdl / usage-python3-pygame-r19-transform-rotate-90-swaps-dims Passed
Rotates a 4x10 Surface by 90 degrees via pygame.transform.rotate and asserts the resulting Surface size is (10,4), pinning the 90-degree axis-swap contract through SDL2.
Pygame mask.from_surface counts only opaque pixels as set Original / libsdl / usage-python3-pygame-r20-mask-from-surface-counts-set-pixels Passed
Builds a 4x4 Surface with per-pixel alpha, sets two pixels to fully-opaque white and the rest transparent, calls mask.from_surface, and asserts mask.count() returns exactly 2, confirming SDL-backed mask construction treats only sufficiently-opaque pixels as set.
Pygame Vector2 normalize returns a unit-length vector Original / libsdl / usage-python3-pygame-r20-math-vector2-normalize-unit-length Passed
Constructs pygame.math.Vector2(3, 4), calls .normalize(), asserts the result has length 1.0 within 1e-9 and components 0.6 and 0.8 within 1e-9 each, confirming SDL-backed Vector2 normalization yields a unit vector preserving direction.
Pygame math.Vector3 length equals 3D Pythagorean magnitude Original / libsdl / usage-python3-pygame-r20-math-vector3-length-pythagoras Passed
Constructs pygame.math.Vector3(2, 3, 6), asserts .length() equals 7.0 to within 1e-9 (since sqrt(4+9+36)==7), confirming SDL-backed Vector3 magnitude follows the 3D Pythagorean formula.
Pygame Rect.union returns the smallest rect enclosing two disjoint rects Original / libsdl / usage-python3-pygame-r20-rect-union-encloses-both Passed
Builds Rect(0, 0, 4, 4) and Rect(10, 6, 2, 3), calls .union, and asserts the result has left=0, top=0, right=12, bottom=9, exactly the bounding box of the inputs, confirming SDL-backed union covers both source rectangles.
Pygame Surface.fill with a rect argument fills only the specified region Original / libsdl / usage-python3-pygame-r20-surface-fill-rect-region-only Passed
Builds a 6x6 Surface initially filled with (0, 0, 0), then calls fill((255, 0, 0), pygame.Rect(2, 2, 2, 2)), asserts the pixel at (3, 3) is red and the pixel at (0, 0) remains black, confirming SDL-backed rect-bounded fill respects the supplied region.
Pygame Surface with SRCALPHA flag reports 32-bit pixel depth Original / libsdl / usage-python3-pygame-r20-surface-get-bitsize-rgba-32 Passed
Constructs pygame.Surface((4, 4), pygame.SRCALPHA), and asserts get_bitsize() returns 32 and get_bytesize() returns 4, confirming SDL-backed per-pixel alpha surfaces default to a 32-bit ARGB/RGBA pixel format.
Pygame Surface.subsurface shares pixel memory with the parent Original / libsdl / usage-python3-pygame-r20-surface-subsurface-shares-pixels Passed
Builds an 8x8 Surface filled with black, creates a 4x4 subsurface starting at (2, 2), writes a green pixel at (0, 0) in the subsurface, and asserts the parent's pixel at (2, 2) is now green, confirming SDL-backed subsurface aliases the parent's pixel buffer.
Pygame time.get_ticks returns a non-decreasing monotonic millisecond counter Original / libsdl / usage-python3-pygame-r20-time-get-ticks-monotonic-nondecreasing Passed
Calls pygame.time.get_ticks twice with a short pygame.time.delay(20) between, and asserts the second reading is >= the first and the difference is at least 5 ms and at most 5000 ms, confirming SDL-backed millisecond timer is monotonic and roughly tracks wall time.
Pygame transform.flip horizontally applied twice restores the original pixel Original / libsdl / usage-python3-pygame-r20-transform-flip-horizontal-twice-identity Passed
Builds a 4x4 Surface, sets pixel (0, 1) to a unique color, calls transform.flip(surf, True, False) twice, and asserts the pixel at (0, 1) matches the original color, confirming the horizontal flip operation is its own inverse.
Pygame transform.scale_by factor 2 doubles surface dimensions Original / libsdl / usage-python3-pygame-r20-transform-scale-by-two-doubles-dims Passed
Builds an 8x6 Surface and calls transform.scale_by(surf, 2.0) (or transform.scale with explicit (16, 12) target if scale_by is unavailable), asserting the returned Surface has width 16 and height 12, confirming SDL-backed proportional rescaling doubles both axes.
Pygame draw.circle returns a dirty Rect with positive width and height Original / libsdl / usage-python3-pygame-r21-draw-aacircle-bounding-box-set Passed
Calls pygame.draw.circle on a black 32x32 Surface and asserts the returned dirty Rect has both width > 0 and height > 0 and intersects the surface area, pinning the SDL-backed circle drawing's dirty-rect reporting contract.
Pygame image.tostring/fromstring RGBA round-trip preserves a sentinel pixel Original / libsdl / usage-python3-pygame-r21-image-tostring-fromstring-rgba-roundtrip Passed
Builds an 8x4 SRCALPHA Surface, paints a unique RGBA sentinel at (2,1), serializes via image.tostring(RGBA), deserializes via fromstring with the same dims, and asserts the sentinel pixel matches the original, pinning the SDL-backed RGBA byte serialization round-trip.
Pygame key.key_code('a') matches pygame.K_a and round-trips through key.name Original / libsdl / usage-python3-pygame-r21-key-name-roundtrip-via-key-code Passed
Calls pygame.key.key_code('a') and asserts it equals pygame.K_a, then calls pygame.key.name on that constant and asserts the returned name is "a", pinning the SDL keysym name<->code translation symmetry.
Pygame mixer.Sound built from a bytes buffer reports a positive length in seconds Original / libsdl / usage-python3-pygame-r21-mixer-sound-array-length-positive Passed
Initializes pygame.mixer with the dummy driver, constructs a Sound from a synthesized PCM buffer, and asserts get_length() returns a strictly positive float, pinning the SDL-mixer-backed duration calculation under the headless audio driver.
Pygame Rect.collidedict returns the (key, value) pair of the first colliding rect Original / libsdl / usage-python3-pygame-r21-rect-collidedict-returns-pair Passed
Builds a probe Rect plus a dict whose keys are rect-style tuples and values are integer labels, calls collidedict with values=False, and asserts the returned tuple's key tuple identifies the overlapping rect, pinning the dict-traversal collision lookup behavior of the SDL-backed Rect helper.
Pygame Rect.collidelist returns the index of the first colliding rect Original / libsdl / usage-python3-pygame-r21-rect-collidelist-returns-index Passed
Builds a probe Rect and a list of three candidate Rects where only the second overlaps the probe, calls collidelist, and asserts the returned index is exactly 1, pinning the first-match-wins semantics of the SDL-backed Rect collision helper.
Pygame sprite.spritecollide(dokill=True) removes the colliding sprite from the group Original / libsdl / usage-python3-pygame-r21-sprite-spritecollide-kills-target Passed
Builds a probe Sprite and a Group with two sprites (one overlapping), calls spritecollide(probe, group, dokill=True), asserts the returned list length is exactly 1, and verifies the group's remaining size is 1 after the kill, pinning the SDL-backed sprite collision-and-remove semantics.
Pygame Surface.blits applies a list of (source, dest) pairs in order Original / libsdl / usage-python3-pygame-r21-surface-blits-list-applies-each Passed
Builds a 6x6 target Surface and two distinct 2x2 source Surfaces; uses Surface.blits to draw the red source at (0,0) and the green source at (4,4) in a single call, then asserts the corresponding pixels reflect each source color, pinning batched blit ordering.
Pygame transform.rotozoom with angle 0 and scale 2 doubles a surface's dimensions Original / libsdl / usage-python3-pygame-r21-transform-rotozoom-scale-doubles-dims Passed
Builds an 8x6 Surface, calls transform.rotozoom(surf, 0.0, 2.0), and asserts the result Surface has size (16, 12), pinning the SDL-backed rotozoom helper's pure-scale branch when the angle is zero.
Pygame Vector2.project onto x-axis returns the x-only component vector Original / libsdl / usage-python3-pygame-r21-vector2-project-onto-known-axis Passed
Constructs pygame.math.Vector2(3, 4) and projects it onto Vector2(1, 0), asserting the result is approximately (3.0, 0.0), pinning the vector projection helper provided by pygame's SDL-backed math module.
Pygame Color HSVA roundtrip Original / libsdl / usage-python3-pygame-r9-color-hsv-roundtrip Passed
Constructs a pygame.Color from an RGB triple, sets its hsva property, and verifies the resulting RGB roundtrips within rounding tolerance.
Pygame draw.line endpoints colored Original / libsdl / usage-python3-pygame-r9-draw-line-pixels Passed
Draws a horizontal line via pygame.draw.line and verifies the start, middle, and end pixels carry the requested color.
Pygame draw.rect outline width Original / libsdl / usage-python3-pygame-r9-draw-rect-thickness Passed
Draws a rectangle outline with width=2 and verifies the interior pixels remain background while edge pixels are the requested color.
Pygame image tobytes/frombytes roundtrip Original / libsdl / usage-python3-pygame-r9-image-tobytes-roundtrip Passed
Serializes a small surface via pygame.image.tobytes(RGB), reconstructs it via frombytes, and verifies pixel equality.
Pygame mask.from_surface counts opaque pixels Original / libsdl / usage-python3-pygame-r9-mask-from-surface Passed
Builds a translucent surface with a single opaque rectangle and verifies pygame.mask.from_surface produces a mask whose count equals the opaque pixel count.
Pygame mask overlap_area counts intersection Original / libsdl / usage-python3-pygame-r9-mask-overlap-area Passed
Builds two pygame.mask.Mask objects and verifies overlap_area on a known offset returns the expected pixel count.
Pygame Surface.blit area sub-rectangle Original / libsdl / usage-python3-pygame-r9-surface-blit-area Passed
Blits a sub-rect of a source surface onto a destination and verifies pixels at the destination match the source's sub-rect contents.
Pygame Surface.fill BLEND_ADD saturates Original / libsdl / usage-python3-pygame-r9-surface-fill-blendadd Passed
Fills a surface initialized with (100, 50, 25) using BLEND_ADD with (10, 60, 250) and verifies channel-wise additive saturation behaves as expected.
Pygame Surface bitsize variants Original / libsdl / usage-python3-pygame-r9-surface-get-bitsize Passed
Creates Surfaces with explicit depths and SRCALPHA flag and verifies get_bitsize / get_bytesize match expected values.
Pygame Clock.tick reports elapsed ms Original / libsdl / usage-python3-pygame-r9-time-clock-tick Passed
Calls pygame.time.Clock().tick() across two frames and verifies the returned millisecond delta is a non-negative integer.
pygame rect clamp_ip Original / libsdl / usage-python3-pygame-rect-clamp-ip Passed
Clamps a pygame Rect that pokes past an outer rectangle and verifies the clamped rectangle stays within the outer bounds.
pygame rectangle clamp Original / libsdl / usage-python3-pygame-rect-clamp Passed
Pygame rect clip Original / libsdl / usage-python3-pygame-rect-clip Passed
pygame Rect.collidedict and collidedictall Original / libsdl / usage-python3-pygame-rect-collidedict Passed
Builds a dict whose values are pygame.Rect (use_values=1 mode) and verifies Rect.collidedict returns one overlapping entry and Rect.collidedictall returns every overlapping label.
Pygame Rect collidepoint Original / libsdl / usage-python3-pygame-rect-collidepoint Passed
Exercises pygame.Rect.collidepoint with interior, edge, and exterior points and verifies the documented half-open semantics on the right and bottom edges.
Pygame Rect colliderect Original / libsdl / usage-python3-pygame-rect-colliderect Passed
Verifies pygame.Rect.colliderect reports overlap for intersecting rectangles and rejects strictly disjoint ones.
Pygame rect collision Original / libsdl / usage-python3-pygame-rect-collision Passed
pygame rect contains Original / libsdl / usage-python3-pygame-rect-contains Passed
Calls pygame Rect.contains with a fully enclosed rectangle and verifies the outer reports containment while the inner does not contain the outer.
pygame Rect copy independence Original / libsdl / usage-python3-pygame-rect-copy Passed
Copies a pygame.Rect via Rect.copy(), mutates the copy in place, and verifies the original Rect remains untouched and the two compare unequal afterwards.
pygame rect fit Original / libsdl / usage-python3-pygame-rect-fit Passed
pygame rect inflate_ip Original / libsdl / usage-python3-pygame-rect-inflate-ip Passed
Calls pygame Rect.inflate_ip with positive deltas and verifies the rectangle grows around its center while preserving the center point.
Pygame rect inflate keeps center Original / libsdl / usage-python3-pygame-rect-inflate-keep-center Passed
Inflates a Pygame Rect by a positive delta and verifies the new size grew while the center stayed put.
pygame rect move ip Original / libsdl / usage-python3-pygame-rect-move-ip Passed
Pygame rect move translation Original / libsdl / usage-python3-pygame-rect-move-translation Passed
Translates a Pygame Rect via move() and confirms the original rect is unchanged while the result is shifted.
pygame rect normalize Original / libsdl / usage-python3-pygame-rect-normalize Passed
pygame Rect scale_by float factor Original / libsdl / usage-python3-pygame-rect-scale-by Passed
Calls pygame.Rect.scale_by with a float factor and verifies the returned Rect grows around its centre while leaving the original Rect untouched.
Pygame rect union Original / libsdl / usage-python3-pygame-rect-union Passed
Pygame Rect unionall Original / libsdl / usage-python3-pygame-rect-unionall Passed
Builds a list of disjoint pygame.Rect instances and verifies unionall returns the smallest bounding rectangle that encloses every member.
pygame sprite collide rect Original / libsdl / usage-python3-pygame-sprite-collide-rect-batch11 Passed
Pygame sprite group add and remove Original / libsdl / usage-python3-pygame-sprite-group-add-remove Passed
Adds three Pygame sprites to a Group, removes one, and verifies the membership and ordering returned by sprites().
Pygame sprite group membership Original / libsdl / usage-python3-pygame-sprite-group-membership Passed
Builds a pygame.sprite.Group, exercises add/remove/has, and verifies sprite count and iteration order before and after removal.
pygame subsurface size Original / libsdl / usage-python3-pygame-subsurface-size Passed
pygame Surface bitsize and bytesize Original / libsdl / usage-python3-pygame-surface-bitsize-bytesize Passed
Creates Pygame surfaces at requested depths (8, 16, 32) and confirms Surface.get_bitsize and Surface.get_bytesize report consistent values whose ratio equals 8 bits per byte.
Pygame surface blit additive blend Original / libsdl / usage-python3-pygame-surface-blend-add Passed
Blits one surface onto another with BLEND_RGB_ADD, saves the result to BMP, verifies the BM signature, and confirms the destination pixel matches the additive sum clamped at 255.
pygame Surface.blit BLEND_RGBA_MULT mode Original / libsdl / usage-python3-pygame-surface-blit-special-flags Passed
Blits a half-intensity gray surface onto a colored destination using the BLEND_RGBA_MULT special flag and verifies each output channel equals the integer-divided product of source and destination per pygame multiply blend semantics.
Pygame surface blit subregion Original / libsdl / usage-python3-pygame-surface-blit-subregion Passed
Blits a sub-rectangle of one Pygame surface onto another using the area argument and verifies pixels inside and outside the copied region.
pygame surface bounding rect Original / libsdl / usage-python3-pygame-surface-bounding-rect Passed
pygame surface clip fill Original / libsdl / usage-python3-pygame-surface-clip-fill Passed
Sets a pygame surface clip rectangle, fills through that clip, and verifies only pixels inside the clip region change color.
pygame surface color key Original / libsdl / usage-python3-pygame-surface-colorkey Passed
Pygame surface convert and convert_alpha Original / libsdl / usage-python3-pygame-surface-convert-alpha Passed
Creates a Pygame surface, hides the prompt, switches between convert and convert_alpha pixel formats, and verifies the alpha-converted surface reports per-pixel alpha bits.
Pygame surface copy Original / libsdl / usage-python3-pygame-surface-copy Passed
pygame surface fill rect Original / libsdl / usage-python3-pygame-surface-fill-rect Passed
Fills a clipped rectangle on a pygame surface and verifies both the returned filled area and painted pixel color.
Pygame surface fill Original / libsdl / usage-python3-pygame-surface-fill Passed
pygame Surface get_alpha defaults Original / libsdl / usage-python3-pygame-surface-get-alpha-default Passed
Verifies the default alpha values reported by Surface.get_alpha() for an opaque RGB surface and an SRCALPHA surface freshly created from pygame.
Pygame surface get_buffer raw Original / libsdl / usage-python3-pygame-surface-get-buffer-raw Passed
Reads a Surface's raw pixel buffer via Surface.get_buffer().raw and verifies its length matches pitch*height for the surface format.
pygame Surface get_flags SRCALPHA Original / libsdl / usage-python3-pygame-surface-get-flags-srcalpha Passed
Creates a Surface with the SRCALPHA flag and confirms Surface.get_flags() reports the flag bit while a plain surface created without the flag does not.
pygame Surface get_pitch byte alignment Original / libsdl / usage-python3-pygame-surface-get-pitch Passed
Creates a small pygame.Surface and verifies Surface.get_pitch() reports a byte-stride consistent with width times bytesize, padded for SDL row alignment.
pygame surface lock state Original / libsdl / usage-python3-pygame-surface-lock-state-batch11 Passed
Pygame surface lock unlock pair Original / libsdl / usage-python3-pygame-surface-lock-unlock Passed
Performs an explicit pygame.Surface.lock/unlock pair, verifying get_locked transitions correctly across the call boundary on a fresh Surface.
pygame surface map rgb Original / libsdl / usage-python3-pygame-surface-map-rgb Passed
Pygame surface scroll Original / libsdl / usage-python3-pygame-surface-scroll Passed
Scrolls a Pygame surface and verifies a previously painted pixel moves to the expected location.
pygame Surface set_alpha Original / libsdl / usage-python3-pygame-surface-set-alpha Passed
Calls Surface.set_alpha on an SRCALPHA surface with a range of values, confirming Surface.get_alpha reports the most recently configured alpha after each call.
Pygame Surface set_at and get_at Original / libsdl / usage-python3-pygame-surface-set-at-get-at Passed
Writes individual pixels via Pygame Surface.set_at and reads them back via get_at to confirm the SDL pixel addressing matches.
pygame surface set_colorkey Original / libsdl / usage-python3-pygame-surface-set-colorkey Passed
Configures a colorkey on a pygame surface and verifies get_colorkey returns the same RGB triple that was set.
pygame surface subsurface Original / libsdl / usage-python3-pygame-surface-subsurface Passed
Creates a pygame subsurface and verifies the subregion preserves the parent fill color and reports the requested smaller size.
pygame surfarray.pixels3d numpy roundtrip Original / libsdl / usage-python3-pygame-surfarray-pixels3d-roundtrip Passed
Locks a pygame surface through surfarray.pixels3d, mutates pixels via numpy slicing, then reads the values back through Surface.get_at to confirm the in-place edit landed and saves the result as BMP.
Pygame surfarray view Original / libsdl / usage-python3-pygame-surfarray Passed
pygame clock busy loop Original / libsdl / usage-python3-pygame-time-busy-loop-batch11 Passed
Pygame time delay Original / libsdl / usage-python3-pygame-time-delay Passed
pygame time wait Original / libsdl / usage-python3-pygame-time-wait Passed
Pygame timer event Original / libsdl / usage-python3-pygame-timer-event Passed
pygame transform average color Original / libsdl / usage-python3-pygame-transform-average-color Passed
Computes the average color of a uniformly painted pygame surface and verifies the returned RGB tuple matches the fill color.
Pygame transform chop Original / libsdl / usage-python3-pygame-transform-chop Passed
Removes a vertical strip from a surface with pygame.transform.chop and verifies the resulting surface dimensions.
pygame transform flip Original / libsdl / usage-python3-pygame-transform-flip-batch11 Passed
Pygame transform flip vertical Original / libsdl / usage-python3-pygame-transform-flip-vertical Passed
Flips a Pygame surface vertically via pygame.transform.flip(False, True) and confirms the top and bottom rows are swapped.
Pygame flips surface Original / libsdl / usage-python3-pygame-transform-flip Passed
Pygame transform grayscale Original / libsdl / usage-python3-pygame-transform-grayscale Passed
Applies pygame.transform.grayscale to a colored surface and verifies the output pixel has equal R, G, and B channels.
Pygame PixelArray inversion preserves dimensions and inverts pixel values Original / libsdl / usage-python3-pygame-transform-invert Passed
Inverts every pixel of a Surface via pygame.PixelArray indexing (255 - r, 255 - g, 255 - b) since pygame 2.5 has no transform.invert; verifies the result has the same dimensions, the originally bright (240, 240, 240) pixel becomes (15, 15, 15) within tolerance, and a black pixel becomes (255, 255, 255).
Pygame rotates surface Original / libsdl / usage-python3-pygame-transform-rotate Passed
pygame transform rotozoom Original / libsdl / usage-python3-pygame-transform-rotozoom Passed
Applies pygame.transform.rotozoom with a scale factor of two and verifies the resulting surface dimensions double exactly.
Pygame transform scale_by float factor Original / libsdl / usage-python3-pygame-transform-scale-by-float Passed
Scales a Pygame surface using pygame.transform.scale_by with a float factor and verifies the resulting integer dimensions.
Pygame transform scale Original / libsdl / usage-python3-pygame-transform-scale Passed
pygame transform scale2x Original / libsdl / usage-python3-pygame-transform-scale2x Passed
pygame transform smoothscale_by factor Original / libsdl / usage-python3-pygame-transform-smoothscale-by Passed
Resizes a pygame surface using transform.smoothscale_by with a fractional factor, saves the result as BMP, checks the BM magic, and asserts the new dimensions.
Pygame smoothscale transform Original / libsdl / usage-python3-pygame-transform-smoothscale Passed
Pygame transform laplacian highlights edge pixels Original / libsdl / usage-python3-pygame-transform-solid-overlay Passed
Applies pygame.transform.laplacian to a Surface that contains a single solid block (pygame 2.5 has no transform.solid_overlay) and verifies the result has matching dimensions, that interior block pixels collapse toward zero (no local edge), and that pixels along the block boundary report a non-zero edge response.
pygame transform threshold Original / libsdl / usage-python3-pygame-transform-threshold Passed
Uses pygame.transform.threshold against a known reference colour to count matching pixels on a tiny surface and verifies the returned match count equals the seeded pixels.
Pygame Vector2 angle_to Original / libsdl / usage-python3-pygame-vector2-angle-to Passed
Computes the signed angle between two pygame.math.Vector2 instances using angle_to and verifies the result equals 90 degrees within a small tolerance.
pygame Vector2 clamp_magnitude Original / libsdl / usage-python3-pygame-vector2-clamp-magnitude Passed
Calls pygame.math.Vector2.clamp_magnitude with a max less than the current length and verifies the resulting vector keeps direction while its length matches the requested cap.
Pygame Vector2 distance and reflect Original / libsdl / usage-python3-pygame-vector2-distance-reflect Passed
Validates pygame.math.Vector2 distance_to, normalize, and reflect operations against analytically known results.
pygame Vector2 dot product Original / libsdl / usage-python3-pygame-vector2-dot-product Passed
Pygame Vector2 elementwise multiplication Original / libsdl / usage-python3-pygame-vector2-elementwise Passed
Multiplies two pygame.math.Vector2 instances component-wise via the elementwise() proxy and verifies each component matches the per-axis product.
pygame vector2 length Original / libsdl / usage-python3-pygame-vector2-length Passed
Pygame Vector2 lerp Original / libsdl / usage-python3-pygame-vector2-lerp Passed
Linearly interpolates between two pygame.math.Vector2 instances at t=0, t=1, and t=0.25 and verifies each result matches the analytical formula.
pygame Vector2 magnitude Original / libsdl / usage-python3-pygame-vector2-magnitude Passed
Computes the magnitude and length of a pygame Vector2(3, 4) and verifies both methods return five.
pygame Vector2 rotate Original / libsdl / usage-python3-pygame-vector2-rotate Passed
pygame Vector3 cross product Original / libsdl / usage-python3-pygame-vector3-cross Passed
Computes the pygame Vector3 cross product of unit X and unit Y and verifies the result equals the unit Z basis vector.
pygame Vector3 dot product Original / libsdl / usage-python3-pygame-vector3-dot Passed
Computes pygame.math.Vector3.dot for orthogonal and parallel pairs and verifies the scalar matches the analytical sum of component products.
Pygame Vector3 normalize Original / libsdl / usage-python3-pygame-vector3-normalize Passed
Normalizes a pygame.math.Vector3 and verifies the result has unit length while the original vector is left unchanged.
Pygame xvfb display Original / libsdl / usage-python3-pygame-xvfb-display Passed
CVE-2017-2888 libsdl regression Original / libsdl / cve-2017-2888 Passed
Asserts that SDL_CreateRGBSurface refuses dimensions whose width*height*bpp arithmetic would overflow, returning NULL with an SDL_GetError diagnostic instead of under-allocating a surface that later triggers a buffer overflow.
CVE-2019-13626 libsdl regression Original / libsdl / cve-2019-13626 Passed
Asserts that SDL_LoadWAV refuses a crafted IMA ADPCM .wav whose fact-chunk sample count and block-align values would have driven the formerly-vulnerable IMA_ADPCM_decode arithmetic into a heap over-read; SDL must reject the file with an SDL_GetError diagnostic instead of crashing.
CVE-2020-14409 libsdl regression Original / libsdl / cve-2020-14409 Passed
Asserts that SDL_LoadBMP_RW refuses a crafted BMP whose width and height both pin near INT_MAX, returning NULL with an SDL_GetError diagnostic rather than wrapping the surface size arithmetic and under-allocating.
Dummy audio queue behavior Port / libsdl / dummy-audio-queue Passed
Headless event timer behavior Port / libsdl / headless-event-timer Passed
Installed SDL test binary Port / libsdl / installed-test-binary Passed
Surface pixel format blit Port / libsdl / surface-blit-pixel-format Passed
SDL version query compile Port / libsdl / version-query-compile Passed
Pygame alpha blit Port / libsdl / usage-python3-pygame-alpha-blit Passed
Pygame audio dummy Port / libsdl / usage-python3-pygame-audio-dummy Passed
pygame Clock.get_fps over multiple ticks Port / libsdl / usage-python3-pygame-clock-get-fps Passed
Drives pygame.time.Clock through twelve tick(50) iterations and verifies get_fps returns a finite nonnegative value, get_time stays small and nonnegative, and the cumulative wall time is close to the expected 12 * 20 ms budget.
pygame Clock get_rawtime and get_time Port / libsdl / usage-python3-pygame-clock-rawtime-gettime Passed
Drives a pygame.time.Clock through two ticks separated by a small delay and verifies that get_rawtime and get_time both return non-negative integers and that get_time is at least as large as get_rawtime.
Pygame clock tick Port / libsdl / usage-python3-pygame-clock-tick Passed
pygame Color.correct_gamma curve Port / libsdl / usage-python3-pygame-color-correct-gamma Passed
Applies pygame.Color.correct_gamma at gamma 2.2 to a midtone color and verifies the resulting channel values monotonically lower the input while preserving the alpha channel.
Pygame Color hex parsing Port / libsdl / usage-python3-pygame-color-hex-parse Passed
Constructs a pygame.Color from a hex string ("#FF0000") and confirms the resulting RGBA channel values.
pygame color HSLA Port / libsdl / usage-python3-pygame-color-hsla-batch11 Passed
Pygame Color HSV round trip Port / libsdl / usage-python3-pygame-color-hsv-roundtrip Passed
Reads the hsva attribute of a known RGB color and round trips through hsva assignment to verify the resulting RGB stays close to the original.
pygame color HSVA Port / libsdl / usage-python3-pygame-color-hsva Passed
Pygame color lerp Port / libsdl / usage-python3-pygame-color-lerp Passed
pygame Color.normalize float channels Port / libsdl / usage-python3-pygame-color-normalize Passed
Constructs a pygame.Color from 8-bit RGBA components and confirms Color.normalize returns the matching unit-interval floats with each component equal to the integer divided by 255.
pygame Color tuple/iter conversion Port / libsdl / usage-python3-pygame-color-tuple-iter Passed
Iterates a pygame.Color directly, converts it to tuple/list, and indexes channels by position to verify the RGBA sequence interface matches the named attributes.
Pygame cursors thickarrow_strings Port / libsdl / usage-python3-pygame-cursors-arrow-string Passed
Validates pygame.cursors.thickarrow_strings is a 24-line string tuple with width divisible by 8 and that pygame.cursors.compile() returns same-length data and mask buffers, exercising the SDL string-cursor compilation path. (pygame 2.x replaced cursors.arrow with a Cursor object; the tuple-of-strings shape now lives in thickarrow_strings and siblings.)
pygame cursors.compile Port / libsdl / usage-python3-pygame-cursors-compile Passed
Compiles an 8x8 ASCII cursor strings tuple via pygame.cursors.compile and verifies the resulting data and mask byte tuples are non-empty and have the expected length.
Pygame custom event Port / libsdl / usage-python3-pygame-custom-event Passed
pygame display caption Port / libsdl / usage-python3-pygame-display-caption Passed
pygame display get driver Port / libsdl / usage-python3-pygame-display-get-driver Passed
Opens a dummy pygame display surface and verifies pygame reports the configured dummy display backend.
Pygame display list_modes under dummy Port / libsdl / usage-python3-pygame-display-list-modes-dummy Passed
Calls pygame.display.list_modes() under the dummy video driver and verifies it returns either -1 or a list of (w, h) pairs with positive dimensions.
Pygame display set mode Port / libsdl / usage-python3-pygame-display-set-mode Passed
Creates a dummy SDL display surface through Pygame and verifies the requested window dimensions.
pygame draw aacircle anti-aliased Port / libsdl / usage-python3-pygame-draw-aacircle Passed
Draws an anti-aliased circle via pygame.draw.aacircle (or falls back to circle on older pygame), saves the surface as BMP, verifies the BM magic, and confirms a non-background pixel exists on the rim.
pygame draw aaline Port / libsdl / usage-python3-pygame-draw-aaline Passed
pygame draw aapolygon anti-aliased Port / libsdl / usage-python3-pygame-draw-aapolygon Passed
Draws an anti-aliased polygon via pygame.draw.aapolygon (or falls back to polygon outline on older pygame), saves it as BMP, verifies the BM magic, and confirms at least one non-background pixel was rendered.
pygame draw arc Port / libsdl / usage-python3-pygame-draw-arc Passed
pygame draw circle Port / libsdl / usage-python3-pygame-draw-circle-batch11 Passed
pygame.draw.circle quadrant flags Port / libsdl / usage-python3-pygame-draw-circle-quadrants Passed
Draws a single quadrant of a circle using the draw_top_right keyword on pygame.draw.circle and confirms pixels in the targeted quadrant are colored while the opposite quadrant remains background.
pygame draw circle width parameter ring Port / libsdl / usage-python3-pygame-draw-circle-ring Passed
Draws a circle with a non-zero width to produce a ring on a pygame surface, saves it as BMP, verifies the BM magic bytes, and confirms the centre pixel stays unfilled while the rim pixel is painted.
Pygame draws circle Port / libsdl / usage-python3-pygame-draw-circle Passed
Pygame draws ellipse Port / libsdl / usage-python3-pygame-draw-ellipse Passed
Pygame draws line Port / libsdl / usage-python3-pygame-draw-line Passed
Pygame draw lines open polyline Port / libsdl / usage-python3-pygame-draw-lines-open Passed
Draws an open multi-segment polyline with pygame.draw.lines (closed=False) and confirms intermediate edges are colored while the implicit closing edge is left untouched.
Pygame draw lines polyline Port / libsdl / usage-python3-pygame-draw-lines-polyline Passed
Draws a multi-segment polyline with pygame.draw.lines and verifies pixels along each segment carry the requested color.
pygame draw polygon filled vs outline Port / libsdl / usage-python3-pygame-draw-polygon-outline Passed
Draws the same triangle once filled (width=0) and once as an outline (width=1) on separate pygame surfaces, asserts that the filled surface paints its interior pixel while the outline-only surface leaves it unfilled but paints an edge pixel, and saves the outline result as BMP with BM magic verified.
Pygame draws polygon Port / libsdl / usage-python3-pygame-draw-polygon Passed
Pygame draw rect with border radius Port / libsdl / usage-python3-pygame-draw-rect-border-radius Passed
Draws a filled rounded rectangle and verifies that the rounded corner pixel is transparent while the center pixel carries the fill color.
Pygame draw rect with RGBA color Port / libsdl / usage-python3-pygame-draw-rect-rgba Passed
Draws a filled rectangle on an SRCALPHA Pygame surface using a 4-tuple RGBA color and verifies the alpha channel is preserved at the painted pixel.
Pygame draw rect Port / libsdl / usage-python3-pygame-draw-rect Passed
pygame event clear Port / libsdl / usage-python3-pygame-event-clear Passed
pygame custom event type Port / libsdl / usage-python3-pygame-event-custom-type-batch11 Passed
pygame event name keydown Port / libsdl / usage-python3-pygame-event-name-keydown Passed
Looks up the pygame event name for KEYDOWN and verifies the returned label identifies a key event.
Pygame event peek Port / libsdl / usage-python3-pygame-event-peek Passed
pygame event.post and event.get loop Port / libsdl / usage-python3-pygame-event-post-get-loop Passed
Posts several distinct USEREVENT-derived events into the pygame queue and drains them through pygame.event.get to verify FIFO order and that custom payload attributes round-trip intact.
Pygame event pump on empty queue Port / libsdl / usage-python3-pygame-event-pump-empty Passed
Pumps the Pygame event loop with no input under the dummy SDL driver and confirms get() returns no events and poll() reports NOEVENT.
Pygame event queue Port / libsdl / usage-python3-pygame-event-queue Passed
pygame event set_allowed and get_blocked Port / libsdl / usage-python3-pygame-event-set-allowed Passed
Blocks an event type, then allows it again via pygame.event.set_allowed and verifies pygame.event.get_blocked round-trips through both states.
pygame event set blocked Port / libsdl / usage-python3-pygame-event-set-blocked Passed
pygame Font bold and italic toggles Port / libsdl / usage-python3-pygame-font-bold-italic-flags Passed
Drives pygame.font.Font.set_bold/set_italic and confirms get_bold/get_italic round-trip the toggles, and that enabling italic strictly widens a rendered glyph compared to italic-off rendering.
pygame Font get_height for default font Port / libsdl / usage-python3-pygame-font-get-height Passed
Initialises pygame.font with the default SysFont, queries Font.get_height(), and verifies it is a positive integer not smaller than the linesize-derived ascent.
pygame font init/get_init/quit cycle Port / libsdl / usage-python3-pygame-font-init-quit-cycle Passed
Cycles pygame.font.init and pygame.font.quit, asserting pygame.font.get_init transitions between True and False at each step.
pygame font linesize Port / libsdl / usage-python3-pygame-font-linesize Passed
Queries a pygame font line size and verifies it is positive and at least as tall as the font height.
Pygame font metrics Port / libsdl / usage-python3-pygame-font-metrics Passed
Pygame font module Port / libsdl / usage-python3-pygame-font-module Passed
pygame font render size Port / libsdl / usage-python3-pygame-font-render-size-batch11 Passed
Pygame font render Port / libsdl / usage-python3-pygame-font-render Passed
pygame font size Port / libsdl / usage-python3-pygame-font-size Passed
Pygame font SysFont fallback Port / libsdl / usage-python3-pygame-font-sysfont Passed
Calls pygame.font.SysFont with a likely-missing family name and verifies pygame falls back to a usable Font object that can still render text.
Pygame image tostring frombytes roundtrip Port / libsdl / usage-python3-pygame-image-frombytes-roundtrip Passed
Serializes a Pygame surface to RGB bytes and rebuilds it via pygame.image.frombytes, verifying dimensions and byte length match.
Pygame image fromstring Port / libsdl / usage-python3-pygame-image-fromstring Passed
pygame.image JPEG save and reload Port / libsdl / usage-python3-pygame-image-jpg-roundtrip Passed
Saves a 16x16 solid-color surface to a JPEG file via pygame.image.save and reloads it, confirming the file begins with the JPEG SOI marker and that the decoded pixel color stays close to the source within JPEG quantization tolerance.
Pygame image load BMP roundtrip Port / libsdl / usage-python3-pygame-image-load-bmp-roundtrip Passed
Saves a small Pygame surface as BMP and reloads it via pygame.image.load, verifying BM magic and matching dimensions.
Pygame image load Port / libsdl / usage-python3-pygame-image-load Passed
pygame image PNG roundtrip Port / libsdl / usage-python3-pygame-image-roundtrip-png-batch11 Passed
pygame image save BMP Port / libsdl / usage-python3-pygame-image-save-bmp Passed
Saves a pygame surface as BMP, verifies the file begins with the BM magic bytes, and reloads it to confirm the original dimensions.
Pygame image save PNG header Port / libsdl / usage-python3-pygame-image-save-png-header Passed
Saves a pygame surface as PNG, checks the on-disk PNG signature bytes, and reloads the file to confirm the original pixel color survives the round trip.
Pygame image save Port / libsdl / usage-python3-pygame-image-save Passed
Pygame image tobytes Port / libsdl / usage-python3-pygame-image-tobytes Passed
Serializes a small Surface with pygame.image.tobytes in RGB and RGBA modes and verifies byte-string lengths match width*height*channels.
Pygame image tostring Port / libsdl / usage-python3-pygame-image-tostring Passed
pygame.joystick init with no devices Port / libsdl / usage-python3-pygame-joystick-empty-init Passed
Initializes pygame.joystick under the headless SDL dummy driver where no input devices are present, then confirms get_init returns True, get_count is zero, instantiating Joystick(0) raises an error, and joystick.quit cleanly tears the subsystem down.
Pygame key event dispatch Port / libsdl / usage-python3-pygame-key-event Passed
pygame key.get_focused Port / libsdl / usage-python3-pygame-key-get-focused Passed
Initializes a pygame display with the dummy driver and confirms pygame.key.get_focused returns a boolean-typed value queryable without error.
Pygame key get_pressed length Port / libsdl / usage-python3-pygame-key-get-pressed-length Passed
Calls pygame.key.get_pressed() under the dummy driver and verifies the returned ScancodeWrapper is non-empty and reports no keys held.
pygame.key modifier state and name lookup Port / libsdl / usage-python3-pygame-key-mod-state Passed
After display init under the dummy driver, queries pygame.key.get_mods plus pygame.key.name and pygame.key.key_code for several constants to confirm modifier state is an integer with no modifiers held and that name/key_code form a round-trip for known keys.
pygame key.name returns "a" for K_a Port / libsdl / usage-python3-pygame-key-name-a Passed
Calls pygame.key.name(K_a) and verifies it returns the string "a", and that K_RETURN maps to a non-empty descriptive name.
pygame mask bounding rects Port / libsdl / usage-python3-pygame-mask-bounding-rects Passed
Builds a pygame mask with a small connected region and verifies get_bounding_rects returns at least one bounding rectangle of nonzero width.
pygame mask centroid Port / libsdl / usage-python3-pygame-mask-centroid Passed
Marks a single opaque pixel in a pygame mask and verifies mask.centroid reports its exact coordinates.
Pygame mask collision Port / libsdl / usage-python3-pygame-mask-collision Passed
pygame mask connected components Port / libsdl / usage-python3-pygame-mask-connected-components-batch11 Passed
pygame mask count tenth Port / libsdl / usage-python3-pygame-mask-count-tenth Passed
Sets two pixels on a pygame mask in the tenth batch and verifies mask.count returns the exact number of set bits.
Pygame mask count Port / libsdl / usage-python3-pygame-mask-count Passed
Pygame mask from_surface density Port / libsdl / usage-python3-pygame-mask-from-surface-density Passed
Builds a checkerboard surface, calls pygame.mask.from_surface(), and confirms the mask reports exactly half of the pixels as set.
pygame Mask.from_surface get_at count centroid Port / libsdl / usage-python3-pygame-mask-from-surface-getat-bmp Passed
Builds a pygame Mask via Mask.from_surface from an alpha surface with a known opaque rectangle, asserts get_at hits, the total count, and the centroid, then saves the source surface to BMP and verifies the BM magic.
pygame mask from threshold Port / libsdl / usage-python3-pygame-mask-from-threshold Passed
pygame mask outline Port / libsdl / usage-python3-pygame-mask-outline Passed
Pygame mask overlap area Port / libsdl / usage-python3-pygame-mask-overlap-area Passed
pygame mixer get_init before and after init Port / libsdl / usage-python3-pygame-mixer-get-init-uninit Passed
Calls pygame.mixer.get_init both before and after initializing the mixer with the dummy driver, confirming None is returned uninitialized and a (frequency, format, channels) tuple after init.
Pygame mixer sound from buffer Port / libsdl / usage-python3-pygame-mixer-sound-buffer Passed
Initializes pygame.mixer with the dummy audio driver, constructs a Sound from a raw PCM buffer, and verifies the reported length and sample count match the input.
Pygame mouse event Port / libsdl / usage-python3-pygame-mouse-event Passed
pygame mouse.get_pressed Port / libsdl / usage-python3-pygame-mouse-get-pressed Passed
Pumps the pygame event queue with the dummy video driver and confirms pygame.mouse.get_pressed returns a tuple of three button states with no buttons currently held down.
pygame PixelArray slice indexing Port / libsdl / usage-python3-pygame-pixelarray-slice-indexing Passed
Creates a PixelArray view over a pygame surface, fills a column with a mapped colour using slice indexing, releases the array, and verifies each pixel in that column matches via Surface.get_at.
Pygame pixelarray write Port / libsdl / usage-python3-pygame-pixelarray Passed
Pygame Color.grayscale luminance conversion Port / libsdl / usage-python3-pygame-r10-color-grayscale Passed
Converts a saturated RGB Color to grayscale via Color.grayscale and verifies the resulting components are equal and within the expected luminance range.
Pygame Mask.fill and Mask.clear toggle every bit Port / libsdl / usage-python3-pygame-r10-mask-fill-clear Passed
Creates a mask, calls fill() and clear(), and verifies count() reaches the full size and zero respectively.
Pygame Mask.invert flips every bit Port / libsdl / usage-python3-pygame-r10-mask-invert Passed
Sets a subset of bits in a mask, calls invert(), and verifies the previously unset bits are now set and previously set bits are clear.
Pygame Rect.clipline trims line to rect bounds Port / libsdl / usage-python3-pygame-r10-rect-clipline Passed
Clips a line that crosses a Rect against the Rect bounds and verifies the returned endpoints sit on the Rect's edges.
Pygame Rect.collidelistall returns all overlapping indices Port / libsdl / usage-python3-pygame-r10-rect-collidelistall Passed
Builds a list of Rects and verifies Rect.collidelistall returns every index whose rect intersects the probe.
Pygame LayeredUpdates respects per-sprite z-order Port / libsdl / usage-python3-pygame-r10-sprite-layered-updates Passed
Adds three sprites to a LayeredUpdates group with explicit layers and verifies sprites() returns them in ascending layer order.
Pygame time.set_timer with explicit loop count Port / libsdl / usage-python3-pygame-r10-time-set-timer-loops Passed
Schedules a USEREVENT timer with loops=3 and verifies exactly three events arrive on the queue before it stops.
Pygame Vector2 as_polar / from_polar roundtrip Port / libsdl / usage-python3-pygame-r10-vector2-as-polar Passed
Converts a Vector2 to polar (r, theta), reconstructs via from_polar, and verifies the roundtrip recovers the original cartesian coordinates.
Pygame Vector2.cross returns scalar 2D cross product Port / libsdl / usage-python3-pygame-r10-vector2-cross-scalar Passed
Computes the 2D cross product via Vector2.cross and verifies sign and magnitude against the analytic value (x1*y2 - y1*x2).
Pygame Vector3.elementwise multiplication Port / libsdl / usage-python3-pygame-r10-vector3-elementwise-mul Passed
Performs an elementwise (Hadamard) product between two Vector3 instances and verifies each component matches the per-axis product.
Pygame Color.cmy reports CMY tuple for primary colors Port / libsdl / usage-python3-pygame-r11-color-cmy-property Passed
Reads Color.cmy on red and white and verifies the cyan/magenta/yellow components match the printing-press complement of RGB.
Pygame Color.update mutates RGBA components in place Port / libsdl / usage-python3-pygame-r11-color-update-rgba Passed
Calls Color.update with explicit r/g/b/a values and verifies the same Color instance now reports the new tuple via iteration.
Pygame Mask.scale doubles dimensions and bit count Port / libsdl / usage-python3-pygame-r11-mask-scale-double Passed
Builds a fully-filled 4x4 Mask, scales it to 8x8 with Mask.scale, and verifies both the new size and that all 64 bits remain set.
Pygame Rect.scale_by doubles dimensions while keeping center Port / libsdl / usage-python3-pygame-r11-rect-scale-by Passed
Calls Rect.scale_by(2.0) and verifies the returned rect has doubled width/height while preserving the original center.
Pygame Rect.unionall returns bounding rect of a list Port / libsdl / usage-python3-pygame-r11-rect-unionall-list Passed
Calls Rect.unionall on a list of three disjoint rects spanning a 30x30 area and confirms the result equals (0,0,30,30).
Pygame Surface.premul_alpha multiplies RGB channels by alpha Port / libsdl / usage-python3-pygame-r11-surface-premul-alpha Passed
Fills an SRCALPHA surface with (200, 100, 50, 128), calls premul_alpha, and verifies each RGB channel is multiplied by alpha/255.
Pygame surfarray.array_red extracts the red channel only Port / libsdl / usage-python3-pygame-r11-surfarray-array-red Passed
Fills a 2x2 surface with (100, 50, 25) and verifies surfarray.array_red returns a 2x2 array where every entry equals 100.
Pygame transform.average_surfaces blends two solid colors Port / libsdl / usage-python3-pygame-r11-transform-average-surfaces Passed
Calls transform.average_surfaces on two solid-red surfaces with intensities 100 and 50 and verifies the result is the per-channel mean (75, 0, 0).
Pygame transform.laplacian preserves surface geometry Port / libsdl / usage-python3-pygame-r11-transform-laplacian-shape Passed
Calls transform.laplacian on a 16x12 uniform-fill surface and verifies the result keeps the same dimensions while collapsing the interior to zero gradient.
Pygame Vector2.move_towards advances by fixed step toward target Port / libsdl / usage-python3-pygame-r11-vector2-move-towards Passed
Calls Vector2.move_towards from origin toward (10, 0) with step 3 and confirms the result is exactly (3, 0).
Pygame draw.circle fills the center pixel with the requested color Port / libsdl / usage-python3-pygame-r12-draw-circle-fills-center-pixel Passed
Draws a filled circle of radius 4 centered at (8, 8) on a black 16x16 surface and asserts get_at at the center returns the requested fill color.
Pygame draw.line paints both endpoint pixels with the line color Port / libsdl / usage-python3-pygame-r12-draw-line-endpoint-pixel Passed
Draws a horizontal line on a black surface from (2, 4) to (10, 4) and asserts get_at at both endpoints returns the line color while a pixel above the line stays black.
Pygame Font.size returns positive width and height for non-empty text Port / libsdl / usage-python3-pygame-r12-font-size-returns-positive Passed
Constructs the default Font at size 16 and asserts Font.size for a multi-character string returns positive integer width and height greater than zero.
Pygame image.frombuffer round-trips bytes back to the original pixels Port / libsdl / usage-python3-pygame-r12-image-frombuffer-roundtrip Passed
Builds a 2x2 RGB byte buffer, constructs a Surface via pygame.image.frombuffer, and asserts each pixel reads back to the matching RGB triple.
Pygame Mask.overlap returns None for disjoint mask regions Port / libsdl / usage-python3-pygame-r12-mask-overlap-disjoint Passed
Builds two filled 4x4 masks and calls overlap with an offset that places them in non-overlapping positions, asserting overlap returns None.
Pygame sprite.Group len reflects added and removed sprites Port / libsdl / usage-python3-pygame-r12-sprite-group-len Passed
Creates a Group, adds three Sprite instances, removes one, and asserts len(group) tracks the membership transitions correctly.
Pygame Surface.blit copies a pixel from a source surface to a destination Port / libsdl / usage-python3-pygame-r12-surface-blit-copy-pixel Passed
Creates a 4x4 source filled red and a 4x4 destination filled blue, blits the source at (0,0), and asserts the destination pixel matches red while a non-overlapping region remains blue.
Pygame Surface set_at and get_at round-trip an RGBA pixel Port / libsdl / usage-python3-pygame-r12-surface-set-at-get-at-roundtrip Passed
Creates an SRCALPHA Surface, writes a known RGBA color with set_at at (3,2), and asserts get_at returns the same 4-tuple.
Pygame transform.rotate by 90 degrees swaps width and height Port / libsdl / usage-python3-pygame-r12-transform-rotate-90-swaps-dims Passed
Rotates a 6x4 surface by 90 degrees with pygame.transform.rotate and asserts the resulting surface size is (4, 6).
Pygame transform.scale produces a surface with the requested target size Port / libsdl / usage-python3-pygame-r12-transform-scale-target-size Passed
Calls pygame.transform.scale on a 4x4 surface to (16, 8) and asserts the returned surface get_size matches the target dimensions.
Pygame cursors.compile encodes an 8x8 ASCII cursor into matching mask bytes Port / libsdl / usage-python3-pygame-r13-cursors-compile-arrow-shape Passed
Calls pygame.cursors.compile on an 8x8 ASCII cursor with both 'X' and '.' glyph rows, and asserts the returned data and mask sequences each contain exactly 8 byte entries (one per row of the 8-pixel-tall cursor).
Pygame event.post enqueues a custom event that event.get returns intact Port / libsdl / usage-python3-pygame-r13-event-post-get-roundtrip Passed
Allocates a custom event type via pygame.event.custom_type, posts an Event carrying a payload dict, and asserts event.get returns exactly one Event with the matching type and payload attribute.
Pygame key.get_pressed returns a sequence indexable by SDL scancodes Port / libsdl / usage-python3-pygame-r13-key-get-pressed-length Passed
Initializes a dummy display, calls pygame.event.pump and pygame.key.get_pressed, asserts the returned sequence has positive length and that probing a known scancode (K_a) does not raise and returns a boolean-ish value.
Pygame mixer.init reports a positive frequency under the dummy audio driver Port / libsdl / usage-python3-pygame-r13-mixer-init-with-dummy-driver Passed
Initializes pygame.mixer under SDL_AUDIODRIVER=dummy, asserts get_init returns a non-None tuple whose frequency is > 0 and channel count is in {1,2}, then quits the mixer cleanly.
Pygame Rect.clip returns the intersection of two overlapping rectangles Port / libsdl / usage-python3-pygame-r13-rect-clip-intersection Passed
Builds two overlapping rectangles, computes Rect.clip, and asserts the resulting Rect represents their intersection at the expected position and size.
Pygame Rect.collidepoint includes the top-left corner and excludes the bottom-right Port / libsdl / usage-python3-pygame-r13-rect-collidepoint-edges Passed
Builds a Rect at (10,20) sized 30x40 and asserts collidepoint returns True for the top-left corner and an interior point, but False for the exclusive bottom-right corner per Pygame's half-open rect convention.
Pygame Rect.inflate grows symmetrically around the original center Port / libsdl / usage-python3-pygame-r13-rect-inflate-grows-around-center Passed
Inflates a 10x10 Rect by (4,6), asserting the resulting size grew by the requested amounts and the center stayed the same as the source rectangle.
Pygame Rect.union returns the bounding rectangle of two inputs Port / libsdl / usage-python3-pygame-r13-rect-union-bounding-box Passed
Builds two disjoint rectangles, calls Rect.union, and asserts the resulting rectangle spans both extents with the expected top-left corner and dimensions.
Pygame Vector2.distance_to returns the Euclidean distance between two points Port / libsdl / usage-python3-pygame-r13-vector2-distance-to Passed
Builds Vector2(0,0) and Vector2(3,4), asserts distance_to returns 5.0 (3-4-5 triangle), and that distance_squared_to returns 25.0 for the same pair.
Pygame Vector3 length and length_squared compute the 3D Euclidean norm Port / libsdl / usage-python3-pygame-r13-vector3-magnitude Passed
Builds Vector3(2,3,6), asserts length_squared returns 49.0 and length returns 7.0 (the 2-3-6-7 Pythagorean quadruple), and that the magnitude alias agrees with length.
Pygame Color('red') exposes the canonical RGBA tuple (255, 0, 0, 255) Port / libsdl / usage-python3-pygame-r14-color-named-rgba-fields Passed
Constructs pygame.Color('red') and asserts the .r/.g/.b/.a fields are 255/0/0/255 respectively, and that tuple(color) equals (255, 0, 0, 255).
Pygame draw.aaline paints a non-background pixel at the start endpoint Port / libsdl / usage-python3-pygame-r14-draw-aaline-endpoint-painted Passed
Fills a 16x16 surface with black, draws an antialiased line from (2, 2) to (12, 12) in white via pygame.draw.aaline, and asserts the pixel at (2, 2) is no longer pure black (the AA line painted at least the starting endpoint).
Pygame draw.rect with width=1 strokes the border but leaves the interior unfilled Port / libsdl / usage-python3-pygame-r14-draw-rect-stroked-outline Passed
Fills a 16x16 surface with black, draws a (255,0,0) stroked rectangle (4,4,8,8) with width=1 via pygame.draw.rect, and asserts the corner pixel is red while the interior pixel at (8, 8) remains black.
Pygame font.Font(None, size).render returns a positively-sized Surface Port / libsdl / usage-python3-pygame-r14-font-render-default-produces-surface Passed
Initialises pygame.font, constructs Font(None, 18), renders the text 'r14' with antialias=True onto a black background, and asserts the returned Surface has positive width and height.
Pygame image.tostring + image.frombuffer round-trip preserves RGB pixels Port / libsdl / usage-python3-pygame-r14-image-tostring-frombuffer-roundtrip Passed
Builds a 3x2 surface with distinct per-pixel colours, exports it via pygame.image.tostring(format='RGB'), reconstructs a new surface via pygame.image.frombuffer with the same size and format, and asserts each pixel of the reconstructed surface matches the source pixel byte-for-byte.
Pygame Rect.normalize converts negative width/height to positive coordinates Port / libsdl / usage-python3-pygame-r14-rect-normalize-negative-dims Passed
Constructs pygame.Rect(10, 10, -4, -3), calls .normalize(), and asserts the resulting topleft is (6, 7) and size is (4, 3) — the rectangle is moved so its origin is the top-left and the dimensions are positive.
Pygame Surface.subsurface shares pixel storage with the parent Port / libsdl / usage-python3-pygame-r14-surface-subsurface-shares-pixels Passed
Creates a 10x10 parent surface filled with black, slices a 4x4 subsurface at offset (2, 2), draws a single white pixel at the subsurface origin, and asserts the parent surface reads white at the corresponding parent coordinate (2, 2).
Pygame transform.average_color returns the fill colour for a uniform surface Port / libsdl / usage-python3-pygame-r14-transform-average-color-uniform-fill Passed
Fills a 4x4 surface with (12, 34, 56) and asserts pygame.transform.average_color returns the matching RGB triple.
Pygame transform.flip preserves surface dimensions for both axes Port / libsdl / usage-python3-pygame-r14-transform-flip-preserves-shape Passed
Builds an 8x5 surface, calls pygame.transform.flip with flip_x=True/flip_y=False then with flip_x=False/flip_y=True, and asserts both flipped surfaces have the same (8, 5) size as the source.
Pygame transform.smoothscale_by doubles surface dimensions with factor 2.0 Port / libsdl / usage-python3-pygame-r14-transform-smoothscale-by-doubles Passed
Builds a 4x3 RGB surface, calls pygame.transform.smoothscale_by with factor 2.0, and asserts the resulting surface size is (8, 6).
Pygame Color.grayscale collapses RGB into a single luminance channel Port / libsdl / usage-python3-pygame-r15-color-grayscale-luminance Passed
Constructs pygame.Color(255, 0, 0) and calls .grayscale(), asserting the resulting Color has equal r, g, b channels (greyscale invariant) and an unchanged alpha of 255.
Pygame event.post then event.get returns the user-event with original attributes Port / libsdl / usage-python3-pygame-r15-event-post-custom-roundtrip Passed
Allocates a custom user event type via pygame.event.custom_type, posts an Event with attribute payload='r15', and asserts pygame.event.get returns at least one event matching the custom type whose payload attribute equals 'r15'.
Pygame font.Font.render returns a Surface whose size matches font.size Port / libsdl / usage-python3-pygame-r15-font-render-produces-surface-with-size Passed
Initializes pygame.font, builds the default Font at size 18, calls font.size('R15') for the expected dimensions and font.render('R15', True, white) for the actual surface, and asserts the rendered surface size matches the size() reading.
Pygame image.save then image.load round-trips a BMP surface byte-for-byte Port / libsdl / usage-python3-pygame-r15-image-save-load-bmp-roundtrip Passed
Builds a 4x3 surface, writes solid green pixels via fill, saves to BMP, reloads via image.load, and asserts the reloaded surface dimensions match and a probe pixel still reads (0, 200, 0).
Pygame Mask.fill sets every bit so count equals width * height Port / libsdl / usage-python3-pygame-r15-mask-fill-count-equals-area Passed
Constructs a pygame.Mask of size (7, 5), calls .fill(), and asserts .count() returns 35 (== 7 * 5), confirming all bits are set after fill.
Pygame Rect.move returns a new Rect with the offset applied to topleft and unchanged size Port / libsdl / usage-python3-pygame-r15-rect-move-shifts-topleft Passed
Builds Rect(5, 6, 8, 9), calls .move(3, 4), and asserts the resulting Rect has topleft (8, 10), size (8, 9) and that the original rectangle is left unchanged at topleft (5, 6).
Pygame sprite.Group reports len equal to the number of added sprites Port / libsdl / usage-python3-pygame-r15-sprite-group-add-len Passed
Constructs three pygame.sprite.Sprite instances, adds them to a sprite.Group, and asserts len(group) is 3 and that each sprite is reported as alive after add.
Pygame Surface.fill paints every probed pixel with the requested RGB color Port / libsdl / usage-python3-pygame-r15-surface-fill-solid-color Passed
Creates a 6x4 surface, calls fill((30, 60, 90)), and asserts get_at on three sampled pixels (corner, center, far corner) returns RGB (30, 60, 90) confirming a uniform fill.
Pygame transform.scale resizes a surface to the requested target dimensions Port / libsdl / usage-python3-pygame-r15-transform-scale-target-dimensions Passed
Builds an 8x4 source surface, calls pygame.transform.scale(src, (16, 12)), and asserts the resulting surface has size exactly (16, 12), confirming the explicit target dimensions are honored.
Pygame Vector2 addition adds components and preserves operand types Port / libsdl / usage-python3-pygame-r15-vector2-add-componentwise Passed
Constructs Vector2(3, 4) and Vector2(1, 2), computes their sum, and asserts the result has x=4.0 and y=6.0 with type Vector2; the source vectors retain their original components.
Pygame Color constructed from the named string "red" reports RGB (255, 0, 0) Port / libsdl / usage-python3-pygame-r16-color-from-string-red Passed
Constructs pygame.Color("red") and asserts the resulting Color's (r, g, b) tuple equals (255, 0, 0) — pinning the named-color lookup path on Ubuntu 24.04 python3-pygame.
Pygame display.set_mode under Xvfb returns a Surface with requested dimensions Port / libsdl / usage-python3-pygame-r16-display-set-mode-dimensions Passed
Calls pygame.display.set_mode((160, 120)) under xvfb-run and asserts the returned Surface reports get_size() == (160, 120) — exercising the live SDL display path rather than the dummy driver.
Pygame draw.rect paints the interior of a rect to the requested color Port / libsdl / usage-python3-pygame-r16-draw-rect-fills-region Passed
Creates a 16x16 Surface filled black, calls pygame.draw.rect with color (200, 50, 25) over a (4,4,8,8) rect, and asserts get_at on a center pixel of the painted region (e.g. (8, 8)) returns RGB (200, 50, 25).
Pygame font.Font(None, 14).render("Ab") returns a Surface with positive area Port / libsdl / usage-python3-pygame-r16-font-render-surface-nontrivial Passed
Loads the default font at size 14, renders "Ab" with antialiasing off and color (255, 255, 255), and asserts the resulting Surface get_size() reports both width and height strictly greater than zero.
Pygame image.save PNG then image.load round-trips a 5x7 Surface size Port / libsdl / usage-python3-pygame-r16-image-load-png-roundtrip-dims Passed
Builds a 5x7 Surface, saves as PNG, reloads it, and asserts the reloaded Surface get_size() is (5, 7) — pinning the PNG codec dimensions round trip, distinct from the BMP r15 round trip.
Pygame image.tobytes then image.frombytes round-trips a small RGB Surface Port / libsdl / usage-python3-pygame-r16-image-tobytes-fromstring-roundtrip Passed
Builds a 4x3 RGB Surface with a known gradient, calls image.tobytes(surf, "RGB"), reconstructs via image.frombytes(data, (4,3), "RGB"), and asserts the reconstructed Surface get_at values match the original at three sampled pixels.
Pygame math.Vector2(3,4) dot (5,6) equals the known value 39 Port / libsdl / usage-python3-pygame-r16-math-vector2-dot-known Passed
Computes pygame.math.Vector2(3, 4).dot(Vector2(5, 6)) and asserts the result is exactly 39.0 — pinning the dot-product implementation on a small integer example.
Pygame sprite.Group add then empty zeroes the membership count Port / libsdl / usage-python3-pygame-r16-sprite-group-add-empty-count Passed
Creates three Sprite instances, adds them to a Group, asserts len(group) == 3, then calls group.empty() and asserts len(group) == 0 — pinning the empty()-clears-membership contract.
Pygame transform.flip horizontal applied twice returns the same pixel values Port / libsdl / usage-python3-pygame-r16-transform-flip-horizontal-roundtrip Passed
Builds a 4x4 Surface with a known gradient, flips horizontally twice via transform.flip(surf, True, False), and asserts the doubly-flipped Surface has identical get_at values to the original at every pixel.
Pygame transform.scale 2x produces a Surface with doubled dimensions Port / libsdl / usage-python3-pygame-r16-transform-scale-doubles-dims Passed
Builds an 8x4 Surface, calls pygame.transform.scale to (16, 8), and asserts the returned Surface reports get_size() == (16, 8) — pinning the explicit-size scale path.
Pygame cursors.compile on a small bitmap returns a 2-tuple of bytes Port / libsdl / usage-python3-pygame-r17-cursors-compile-returns-2-tuple Passed
Calls pygame.cursors.compile on a small uniform-width string cursor and asserts the return is a tuple of length 2, pinning the documented (data, mask) return shape.
Pygame draw.line midpoint pixel readback matches the requested colour Port / libsdl / usage-python3-pygame-r17-draw-line-midpoint-pixel-readback Passed
Draws a horizontal line on a black 11x11 Surface and asserts Surface.get_at on the midpoint returns the requested colour, pinning the basic line rasterisation path through SDL2's renderer-less Surface drawing.
Pygame font.SysFont falls back to default and returns a Font object Port / libsdl / usage-python3-pygame-r17-font-sysfont-fallback-returns-font Passed
Calls pygame.font.SysFont with a deliberately bogus family name and asserts the returned object is an instance of pygame.font.Font — exercising the system-font fallback path bundled with SDL_ttf.
Pygame image.save JPG round-trip preserves Surface dimensions Port / libsdl / usage-python3-pygame-r17-image-save-jpg-roundtrip-dims Passed
Creates an opaque RGB Surface, saves it as JPG via pygame.image.save, reloads it, and asserts get_size() matches the original — exercising the SDL_image JPG codec dimension fidelity.
Pygame mouse.set_visible(False) returns 1 (the previous visible state) Port / libsdl / usage-python3-pygame-r17-mouse-set-visible-returns-previous-state Passed
Creates a display under xvfb-run, calls pygame.mouse.set_visible(False), and asserts the return equals 1 — pinning the SDL convention that set_visible returns the prior boolean state as an int.
Pygame PixelArray.replace swaps a colour and Surface.get_at confirms the change Port / libsdl / usage-python3-pygame-r17-pixelarray-replace-roundtrip Passed
Fills a Surface with a known colour, opens a PixelArray, replaces it with a new colour, and asserts Surface.get_at((0,0)) reports the new colour — exercising direct pixel rewrite through pygame's PixelArray wrapper.
Pygame Surface.blit applied twice yields the source colour at the centre Port / libsdl / usage-python3-pygame-r17-surface-blit-twice-center-matches Passed
Blits a 4x4 coloured Surface onto a 16x16 base at the same offset twice and asserts Surface.get_at on the centre of the blitted area returns the source colour, exercising cumulative blits through SDL2.
Pygame Surface.set_alpha value is reflected by get_alpha Port / libsdl / usage-python3-pygame-r17-surface-set-alpha-getter-roundtrip Passed
Creates a Surface, calls set_alpha(128), and asserts get_alpha() returns 128, pinning the SDL alpha-property round trip via pygame.
Pygame Surface.subsurface within bounds returns the requested dimensions Port / libsdl / usage-python3-pygame-r17-surface-subsurface-roundtrip-dims Passed
Creates a 20x16 Surface, slices a (4,3)-(12,9) subsurface, and asserts get_size() returns (8, 6) — pinning the SDL-backed Surface region view dimensions.
Pygame image.tostring with RGB format yields w*h*3 bytes Port / libsdl / usage-python3-pygame-r18-image-tostring-rgb-length-matches Passed
Builds an 8x6 Surface, calls pygame.image.tostring(surf, "RGB"), and asserts the byte length equals 8*6*3 — pinning the SDL-backed pixel serialisation length contract for the RGB format.
Pygame Rect.collidepoint returns True for inside and False for outside Port / libsdl / usage-python3-pygame-r18-rect-collidepoint-inside-outside Passed
Builds a Rect at (10,20,30,40), asserts collidepoint((15,25)) is True and collidepoint((100,100)) is False, pinning the inclusive-left/exclusive-right Rect membership semantics on Ubuntu 24.04 pygame.
Pygame Rect.inflate expands width and height symmetrically Port / libsdl / usage-python3-pygame-r18-rect-inflate-grows-equally-each-side Passed
Inflates a Rect(10,20,30,40) by (10,20) and asserts the new rect is (5,10,40,60) — pinning that inflate distributes growth half on each side as documented.
Pygame Rect.move shifts position while preserving width and height Port / libsdl / usage-python3-pygame-r18-rect-move-preserves-size Passed
Moves a Rect(5,5,20,30) by (3,4) and asserts the result is (8,9,20,30), pinning that move returns a new Rect with shifted origin and unchanged size.
Pygame Rect.union produces the bounding rect covering both inputs Port / libsdl / usage-python3-pygame-r18-rect-union-spans-both-rects Passed
Computes Rect(0,0,10,10).union(Rect(5,5,20,20)) and asserts the union is (0,0,25,25), pinning the bounding-box union shape on Ubuntu 24.04 pygame.
Pygame Surface.fill colour reads back via get_at on multiple coordinates Port / libsdl / usage-python3-pygame-r18-surface-fill-then-get-at-roundtrip Passed
Fills a 6x6 Surface with (12,34,56) and asserts get_at returns the same RGB triple at three different coordinates, pinning the SDL surface fill + pixel readback round trip.
Pygame Surface.set_at writes a single pixel observable via get_at Port / libsdl / usage-python3-pygame-r18-surface-set-at-single-pixel-readback Passed
Fills an 8x8 Surface with a base colour, calls set_at((4,4),(200,100,50)) and asserts get_at((4,4)) returns the new colour while a neighbour at (4,5) keeps the base colour — pinning isolated pixel writes through SDL2.
Pygame time.Clock.tick returns a non-negative millisecond delta Port / libsdl / usage-python3-pygame-r18-time-clock-tick-returns-nonneg-ms Passed
Constructs a pygame.time.Clock and asserts the first tick(60) call returns a non-negative integer milliseconds-since-last-tick value, pinning the SDL-backed timer contract.
Pygame transform.flip horizontal mirrors a coloured-edge Surface Port / libsdl / usage-python3-pygame-r18-transform-flip-x-mirrors-pixels Passed
Sets the left column of a Surface to red, the right column to blue, calls pygame.transform.flip(s, True, False), and asserts the colours have swapped — pinning horizontal flip semantics through SDL2.
Pygame transform.scale doubles Surface dimensions to the requested size Port / libsdl / usage-python3-pygame-r18-transform-scale-doubles-dims Passed
Scales a 5x4 Surface to (10,8) via pygame.transform.scale and asserts get_size returns (10,8), pinning the explicit-target-size scaling contract through SDL2.
Pygame Color exposes r/g/b/a attributes in the expected channel order Port / libsdl / usage-python3-pygame-r19-color-rgb-channel-order Passed
Constructs pygame.Color(10,20,30,40) and asserts the .r, .g, .b, .a attributes are exactly 10, 20, 30, 40 respectively, pinning the documented channel-attribute order on Ubuntu 24.04 pygame.
Pygame image.save then image.load PNG preserves a sentinel pixel value Port / libsdl / usage-python3-pygame-r19-image-save-load-png-roundtrip-pixel Passed
Fills a 6x6 Surface with (42,84,168), saves to PNG via pygame.image.save, reloads via pygame.image.load, and asserts get_at(3,3) returns the same RGB triple, pinning the SDL_image PNG save/load round trip.
Pygame math.Vector2 dot product is zero for perpendicular vectors Port / libsdl / usage-python3-pygame-r19-math-vector2-dot-perpendicular Passed
Constructs Vector2(1,0) and Vector2(0,1) and asserts their dot product equals zero exactly, pinning the dot-product orthogonality result for axis-aligned unit vectors.
Pygame math.Vector2(3,4).length equals 5 by Pythagoras Port / libsdl / usage-python3-pygame-r19-math-vector2-length-pythagoras Passed
Constructs pygame.math.Vector2(3,4) and asserts length() returns 5.0 within 1e-9 tolerance, pinning the Euclidean magnitude computation in the vector module.
Pygame Rect.clamp keeps a smaller rect inside a larger bounding rect Port / libsdl / usage-python3-pygame-r19-rect-clamp-inside-larger-rect Passed
Calls Rect(100,100,10,10).clamp(Rect(0,0,50,50)) and asserts the clamped rect is positioned at (40,40,10,10), pinning the clamp-against-bounds semantics on Ubuntu 24.04 pygame.
Pygame Rect.contains reports True for a strictly enclosed Rect and False otherwise Port / libsdl / usage-python3-pygame-r19-rect-contains-strict-inside Passed
Builds an outer Rect(0,0,100,100) and asserts contains(Rect(10,10,50,50)) is True while contains(Rect(80,80,50,50)) is False, pinning the strict-inside Rect containment contract.
Pygame sprite.Group reports len equal to the number of added sprites Port / libsdl / usage-python3-pygame-r19-sprite-group-add-and-len Passed
Creates three pygame.sprite.Sprite instances with image+rect, adds them to a Group, and asserts len(group) is 3 and all sprites appear in the group's sprites() list, pinning the sprite-group membership API.
Pygame Surface.blit with source area selects only the requested subregion Port / libsdl / usage-python3-pygame-r19-surface-blit-area-source-subregion Passed
Fills two halves of an 8x4 source Surface (left red, right blue), blits onto a black destination with area=Rect(0,0,4,4) (left half only), and asserts the destination contains red and not blue, pinning the area-based subregion blit contract.
Pygame Surface.convert_alpha returns a SRCALPHA-flagged Surface Port / libsdl / usage-python3-pygame-r19-surface-convert-alpha-has-srcalpha Passed
Creates a display Surface on the dummy driver, calls convert_alpha on a freshly allocated Surface, and asserts the resulting Surface has the SRCALPHA flag bit set in get_flags, pinning the alpha-conversion contract.
Pygame transform.rotate 90 degrees swaps a non-square Surface's dimensions Port / libsdl / usage-python3-pygame-r19-transform-rotate-90-swaps-dims Passed
Rotates a 4x10 Surface by 90 degrees via pygame.transform.rotate and asserts the resulting Surface size is (10,4), pinning the 90-degree axis-swap contract through SDL2.
Pygame mask.from_surface counts only opaque pixels as set Port / libsdl / usage-python3-pygame-r20-mask-from-surface-counts-set-pixels Passed
Builds a 4x4 Surface with per-pixel alpha, sets two pixels to fully-opaque white and the rest transparent, calls mask.from_surface, and asserts mask.count() returns exactly 2, confirming SDL-backed mask construction treats only sufficiently-opaque pixels as set.
Pygame Vector2 normalize returns a unit-length vector Port / libsdl / usage-python3-pygame-r20-math-vector2-normalize-unit-length Passed
Constructs pygame.math.Vector2(3, 4), calls .normalize(), asserts the result has length 1.0 within 1e-9 and components 0.6 and 0.8 within 1e-9 each, confirming SDL-backed Vector2 normalization yields a unit vector preserving direction.
Pygame math.Vector3 length equals 3D Pythagorean magnitude Port / libsdl / usage-python3-pygame-r20-math-vector3-length-pythagoras Passed
Constructs pygame.math.Vector3(2, 3, 6), asserts .length() equals 7.0 to within 1e-9 (since sqrt(4+9+36)==7), confirming SDL-backed Vector3 magnitude follows the 3D Pythagorean formula.
Pygame Rect.union returns the smallest rect enclosing two disjoint rects Port / libsdl / usage-python3-pygame-r20-rect-union-encloses-both Passed
Builds Rect(0, 0, 4, 4) and Rect(10, 6, 2, 3), calls .union, and asserts the result has left=0, top=0, right=12, bottom=9, exactly the bounding box of the inputs, confirming SDL-backed union covers both source rectangles.
Pygame Surface.fill with a rect argument fills only the specified region Port / libsdl / usage-python3-pygame-r20-surface-fill-rect-region-only Passed
Builds a 6x6 Surface initially filled with (0, 0, 0), then calls fill((255, 0, 0), pygame.Rect(2, 2, 2, 2)), asserts the pixel at (3, 3) is red and the pixel at (0, 0) remains black, confirming SDL-backed rect-bounded fill respects the supplied region.
Pygame Surface with SRCALPHA flag reports 32-bit pixel depth Port / libsdl / usage-python3-pygame-r20-surface-get-bitsize-rgba-32 Passed
Constructs pygame.Surface((4, 4), pygame.SRCALPHA), and asserts get_bitsize() returns 32 and get_bytesize() returns 4, confirming SDL-backed per-pixel alpha surfaces default to a 32-bit ARGB/RGBA pixel format.
Pygame Surface.subsurface shares pixel memory with the parent Port / libsdl / usage-python3-pygame-r20-surface-subsurface-shares-pixels Passed
Builds an 8x8 Surface filled with black, creates a 4x4 subsurface starting at (2, 2), writes a green pixel at (0, 0) in the subsurface, and asserts the parent's pixel at (2, 2) is now green, confirming SDL-backed subsurface aliases the parent's pixel buffer.
Pygame time.get_ticks returns a non-decreasing monotonic millisecond counter Port / libsdl / usage-python3-pygame-r20-time-get-ticks-monotonic-nondecreasing Passed
Calls pygame.time.get_ticks twice with a short pygame.time.delay(20) between, and asserts the second reading is >= the first and the difference is at least 5 ms and at most 5000 ms, confirming SDL-backed millisecond timer is monotonic and roughly tracks wall time.
Pygame transform.flip horizontally applied twice restores the original pixel Port / libsdl / usage-python3-pygame-r20-transform-flip-horizontal-twice-identity Passed
Builds a 4x4 Surface, sets pixel (0, 1) to a unique color, calls transform.flip(surf, True, False) twice, and asserts the pixel at (0, 1) matches the original color, confirming the horizontal flip operation is its own inverse.
Pygame transform.scale_by factor 2 doubles surface dimensions Port / libsdl / usage-python3-pygame-r20-transform-scale-by-two-doubles-dims Passed
Builds an 8x6 Surface and calls transform.scale_by(surf, 2.0) (or transform.scale with explicit (16, 12) target if scale_by is unavailable), asserting the returned Surface has width 16 and height 12, confirming SDL-backed proportional rescaling doubles both axes.
Pygame draw.circle returns a dirty Rect with positive width and height Port / libsdl / usage-python3-pygame-r21-draw-aacircle-bounding-box-set Passed
Calls pygame.draw.circle on a black 32x32 Surface and asserts the returned dirty Rect has both width > 0 and height > 0 and intersects the surface area, pinning the SDL-backed circle drawing's dirty-rect reporting contract.
Pygame image.tostring/fromstring RGBA round-trip preserves a sentinel pixel Port / libsdl / usage-python3-pygame-r21-image-tostring-fromstring-rgba-roundtrip Passed
Builds an 8x4 SRCALPHA Surface, paints a unique RGBA sentinel at (2,1), serializes via image.tostring(RGBA), deserializes via fromstring with the same dims, and asserts the sentinel pixel matches the original, pinning the SDL-backed RGBA byte serialization round-trip.
Pygame key.key_code('a') matches pygame.K_a and round-trips through key.name Port / libsdl / usage-python3-pygame-r21-key-name-roundtrip-via-key-code Passed
Calls pygame.key.key_code('a') and asserts it equals pygame.K_a, then calls pygame.key.name on that constant and asserts the returned name is "a", pinning the SDL keysym name<->code translation symmetry.
Pygame mixer.Sound built from a bytes buffer reports a positive length in seconds Port / libsdl / usage-python3-pygame-r21-mixer-sound-array-length-positive Passed
Initializes pygame.mixer with the dummy driver, constructs a Sound from a synthesized PCM buffer, and asserts get_length() returns a strictly positive float, pinning the SDL-mixer-backed duration calculation under the headless audio driver.
Pygame Rect.collidedict returns the (key, value) pair of the first colliding rect Port / libsdl / usage-python3-pygame-r21-rect-collidedict-returns-pair Passed
Builds a probe Rect plus a dict whose keys are rect-style tuples and values are integer labels, calls collidedict with values=False, and asserts the returned tuple's key tuple identifies the overlapping rect, pinning the dict-traversal collision lookup behavior of the SDL-backed Rect helper.
Pygame Rect.collidelist returns the index of the first colliding rect Port / libsdl / usage-python3-pygame-r21-rect-collidelist-returns-index Passed
Builds a probe Rect and a list of three candidate Rects where only the second overlaps the probe, calls collidelist, and asserts the returned index is exactly 1, pinning the first-match-wins semantics of the SDL-backed Rect collision helper.
Pygame sprite.spritecollide(dokill=True) removes the colliding sprite from the group Port / libsdl / usage-python3-pygame-r21-sprite-spritecollide-kills-target Passed
Builds a probe Sprite and a Group with two sprites (one overlapping), calls spritecollide(probe, group, dokill=True), asserts the returned list length is exactly 1, and verifies the group's remaining size is 1 after the kill, pinning the SDL-backed sprite collision-and-remove semantics.
Pygame Surface.blits applies a list of (source, dest) pairs in order Port / libsdl / usage-python3-pygame-r21-surface-blits-list-applies-each Passed
Builds a 6x6 target Surface and two distinct 2x2 source Surfaces; uses Surface.blits to draw the red source at (0,0) and the green source at (4,4) in a single call, then asserts the corresponding pixels reflect each source color, pinning batched blit ordering.
Pygame transform.rotozoom with angle 0 and scale 2 doubles a surface's dimensions Port / libsdl / usage-python3-pygame-r21-transform-rotozoom-scale-doubles-dims Passed
Builds an 8x6 Surface, calls transform.rotozoom(surf, 0.0, 2.0), and asserts the result Surface has size (16, 12), pinning the SDL-backed rotozoom helper's pure-scale branch when the angle is zero.
Pygame Vector2.project onto x-axis returns the x-only component vector Port / libsdl / usage-python3-pygame-r21-vector2-project-onto-known-axis Passed
Constructs pygame.math.Vector2(3, 4) and projects it onto Vector2(1, 0), asserting the result is approximately (3.0, 0.0), pinning the vector projection helper provided by pygame's SDL-backed math module.
Pygame Color HSVA roundtrip Port / libsdl / usage-python3-pygame-r9-color-hsv-roundtrip Passed
Constructs a pygame.Color from an RGB triple, sets its hsva property, and verifies the resulting RGB roundtrips within rounding tolerance.
Pygame draw.line endpoints colored Port / libsdl / usage-python3-pygame-r9-draw-line-pixels Passed
Draws a horizontal line via pygame.draw.line and verifies the start, middle, and end pixels carry the requested color.
Pygame draw.rect outline width Port / libsdl / usage-python3-pygame-r9-draw-rect-thickness Passed
Draws a rectangle outline with width=2 and verifies the interior pixels remain background while edge pixels are the requested color.
Pygame image tobytes/frombytes roundtrip Port / libsdl / usage-python3-pygame-r9-image-tobytes-roundtrip Passed
Serializes a small surface via pygame.image.tobytes(RGB), reconstructs it via frombytes, and verifies pixel equality.
Pygame mask.from_surface counts opaque pixels Port / libsdl / usage-python3-pygame-r9-mask-from-surface Passed
Builds a translucent surface with a single opaque rectangle and verifies pygame.mask.from_surface produces a mask whose count equals the opaque pixel count.
Pygame mask overlap_area counts intersection Port / libsdl / usage-python3-pygame-r9-mask-overlap-area Passed
Builds two pygame.mask.Mask objects and verifies overlap_area on a known offset returns the expected pixel count.
Pygame Surface.blit area sub-rectangle Port / libsdl / usage-python3-pygame-r9-surface-blit-area Passed
Blits a sub-rect of a source surface onto a destination and verifies pixels at the destination match the source's sub-rect contents.
Pygame Surface.fill BLEND_ADD saturates Port / libsdl / usage-python3-pygame-r9-surface-fill-blendadd Passed
Fills a surface initialized with (100, 50, 25) using BLEND_ADD with (10, 60, 250) and verifies channel-wise additive saturation behaves as expected.
Pygame Surface bitsize variants Port / libsdl / usage-python3-pygame-r9-surface-get-bitsize Passed
Creates Surfaces with explicit depths and SRCALPHA flag and verifies get_bitsize / get_bytesize match expected values.
Pygame Clock.tick reports elapsed ms Port / libsdl / usage-python3-pygame-r9-time-clock-tick Passed
Calls pygame.time.Clock().tick() across two frames and verifies the returned millisecond delta is a non-negative integer.
pygame rect clamp_ip Port / libsdl / usage-python3-pygame-rect-clamp-ip Passed
Clamps a pygame Rect that pokes past an outer rectangle and verifies the clamped rectangle stays within the outer bounds.
pygame rectangle clamp Port / libsdl / usage-python3-pygame-rect-clamp Passed
Pygame rect clip Port / libsdl / usage-python3-pygame-rect-clip Passed
pygame Rect.collidedict and collidedictall Port / libsdl / usage-python3-pygame-rect-collidedict Passed
Builds a dict whose values are pygame.Rect (use_values=1 mode) and verifies Rect.collidedict returns one overlapping entry and Rect.collidedictall returns every overlapping label.
Pygame Rect collidepoint Port / libsdl / usage-python3-pygame-rect-collidepoint Passed
Exercises pygame.Rect.collidepoint with interior, edge, and exterior points and verifies the documented half-open semantics on the right and bottom edges.
Pygame Rect colliderect Port / libsdl / usage-python3-pygame-rect-colliderect Passed
Verifies pygame.Rect.colliderect reports overlap for intersecting rectangles and rejects strictly disjoint ones.
Pygame rect collision Port / libsdl / usage-python3-pygame-rect-collision Passed
pygame rect contains Port / libsdl / usage-python3-pygame-rect-contains Passed
Calls pygame Rect.contains with a fully enclosed rectangle and verifies the outer reports containment while the inner does not contain the outer.
pygame Rect copy independence Port / libsdl / usage-python3-pygame-rect-copy Passed
Copies a pygame.Rect via Rect.copy(), mutates the copy in place, and verifies the original Rect remains untouched and the two compare unequal afterwards.
pygame rect fit Port / libsdl / usage-python3-pygame-rect-fit Passed
pygame rect inflate_ip Port / libsdl / usage-python3-pygame-rect-inflate-ip Passed
Calls pygame Rect.inflate_ip with positive deltas and verifies the rectangle grows around its center while preserving the center point.
Pygame rect inflate keeps center Port / libsdl / usage-python3-pygame-rect-inflate-keep-center Passed
Inflates a Pygame Rect by a positive delta and verifies the new size grew while the center stayed put.
pygame rect move ip Port / libsdl / usage-python3-pygame-rect-move-ip Passed
Pygame rect move translation Port / libsdl / usage-python3-pygame-rect-move-translation Passed
Translates a Pygame Rect via move() and confirms the original rect is unchanged while the result is shifted.
pygame rect normalize Port / libsdl / usage-python3-pygame-rect-normalize Passed
pygame Rect scale_by float factor Port / libsdl / usage-python3-pygame-rect-scale-by Passed
Calls pygame.Rect.scale_by with a float factor and verifies the returned Rect grows around its centre while leaving the original Rect untouched.
Pygame rect union Port / libsdl / usage-python3-pygame-rect-union Passed
Pygame Rect unionall Port / libsdl / usage-python3-pygame-rect-unionall Passed
Builds a list of disjoint pygame.Rect instances and verifies unionall returns the smallest bounding rectangle that encloses every member.
pygame sprite collide rect Port / libsdl / usage-python3-pygame-sprite-collide-rect-batch11 Passed
Pygame sprite group add and remove Port / libsdl / usage-python3-pygame-sprite-group-add-remove Passed
Adds three Pygame sprites to a Group, removes one, and verifies the membership and ordering returned by sprites().
Pygame sprite group membership Port / libsdl / usage-python3-pygame-sprite-group-membership Passed
Builds a pygame.sprite.Group, exercises add/remove/has, and verifies sprite count and iteration order before and after removal.
pygame subsurface size Port / libsdl / usage-python3-pygame-subsurface-size Passed
pygame Surface bitsize and bytesize Port / libsdl / usage-python3-pygame-surface-bitsize-bytesize Passed
Creates Pygame surfaces at requested depths (8, 16, 32) and confirms Surface.get_bitsize and Surface.get_bytesize report consistent values whose ratio equals 8 bits per byte.
Pygame surface blit additive blend Port / libsdl / usage-python3-pygame-surface-blend-add Passed
Blits one surface onto another with BLEND_RGB_ADD, saves the result to BMP, verifies the BM signature, and confirms the destination pixel matches the additive sum clamped at 255.
pygame Surface.blit BLEND_RGBA_MULT mode Port / libsdl / usage-python3-pygame-surface-blit-special-flags Passed
Blits a half-intensity gray surface onto a colored destination using the BLEND_RGBA_MULT special flag and verifies each output channel equals the integer-divided product of source and destination per pygame multiply blend semantics.
Pygame surface blit subregion Port / libsdl / usage-python3-pygame-surface-blit-subregion Passed
Blits a sub-rectangle of one Pygame surface onto another using the area argument and verifies pixels inside and outside the copied region.
pygame surface bounding rect Port / libsdl / usage-python3-pygame-surface-bounding-rect Passed
pygame surface clip fill Port / libsdl / usage-python3-pygame-surface-clip-fill Passed
Sets a pygame surface clip rectangle, fills through that clip, and verifies only pixels inside the clip region change color.
pygame surface color key Port / libsdl / usage-python3-pygame-surface-colorkey Passed
Pygame surface convert and convert_alpha Port / libsdl / usage-python3-pygame-surface-convert-alpha Passed
Creates a Pygame surface, hides the prompt, switches between convert and convert_alpha pixel formats, and verifies the alpha-converted surface reports per-pixel alpha bits.
Pygame surface copy Port / libsdl / usage-python3-pygame-surface-copy Passed
pygame surface fill rect Port / libsdl / usage-python3-pygame-surface-fill-rect Passed
Fills a clipped rectangle on a pygame surface and verifies both the returned filled area and painted pixel color.
Pygame surface fill Port / libsdl / usage-python3-pygame-surface-fill Passed
pygame Surface get_alpha defaults Port / libsdl / usage-python3-pygame-surface-get-alpha-default Passed
Verifies the default alpha values reported by Surface.get_alpha() for an opaque RGB surface and an SRCALPHA surface freshly created from pygame.
Pygame surface get_buffer raw Port / libsdl / usage-python3-pygame-surface-get-buffer-raw Passed
Reads a Surface's raw pixel buffer via Surface.get_buffer().raw and verifies its length matches pitch*height for the surface format.
pygame Surface get_flags SRCALPHA Port / libsdl / usage-python3-pygame-surface-get-flags-srcalpha Passed
Creates a Surface with the SRCALPHA flag and confirms Surface.get_flags() reports the flag bit while a plain surface created without the flag does not.
pygame Surface get_pitch byte alignment Port / libsdl / usage-python3-pygame-surface-get-pitch Passed
Creates a small pygame.Surface and verifies Surface.get_pitch() reports a byte-stride consistent with width times bytesize, padded for SDL row alignment.
pygame surface lock state Port / libsdl / usage-python3-pygame-surface-lock-state-batch11 Passed
Pygame surface lock unlock pair Port / libsdl / usage-python3-pygame-surface-lock-unlock Passed
Performs an explicit pygame.Surface.lock/unlock pair, verifying get_locked transitions correctly across the call boundary on a fresh Surface.
pygame surface map rgb Port / libsdl / usage-python3-pygame-surface-map-rgb Passed
Pygame surface scroll Port / libsdl / usage-python3-pygame-surface-scroll Passed
Scrolls a Pygame surface and verifies a previously painted pixel moves to the expected location.
pygame Surface set_alpha Port / libsdl / usage-python3-pygame-surface-set-alpha Passed
Calls Surface.set_alpha on an SRCALPHA surface with a range of values, confirming Surface.get_alpha reports the most recently configured alpha after each call.
Pygame Surface set_at and get_at Port / libsdl / usage-python3-pygame-surface-set-at-get-at Passed
Writes individual pixels via Pygame Surface.set_at and reads them back via get_at to confirm the SDL pixel addressing matches.
pygame surface set_colorkey Port / libsdl / usage-python3-pygame-surface-set-colorkey Passed
Configures a colorkey on a pygame surface and verifies get_colorkey returns the same RGB triple that was set.
pygame surface subsurface Port / libsdl / usage-python3-pygame-surface-subsurface Passed
Creates a pygame subsurface and verifies the subregion preserves the parent fill color and reports the requested smaller size.
pygame surfarray.pixels3d numpy roundtrip Port / libsdl / usage-python3-pygame-surfarray-pixels3d-roundtrip Passed
Locks a pygame surface through surfarray.pixels3d, mutates pixels via numpy slicing, then reads the values back through Surface.get_at to confirm the in-place edit landed and saves the result as BMP.
Pygame surfarray view Port / libsdl / usage-python3-pygame-surfarray Passed
pygame clock busy loop Port / libsdl / usage-python3-pygame-time-busy-loop-batch11 Passed
Pygame time delay Port / libsdl / usage-python3-pygame-time-delay Passed
pygame time wait Port / libsdl / usage-python3-pygame-time-wait Passed
Pygame timer event Port / libsdl / usage-python3-pygame-timer-event Passed
pygame transform average color Port / libsdl / usage-python3-pygame-transform-average-color Passed
Computes the average color of a uniformly painted pygame surface and verifies the returned RGB tuple matches the fill color.
Pygame transform chop Port / libsdl / usage-python3-pygame-transform-chop Passed
Removes a vertical strip from a surface with pygame.transform.chop and verifies the resulting surface dimensions.
pygame transform flip Port / libsdl / usage-python3-pygame-transform-flip-batch11 Passed
Pygame transform flip vertical Port / libsdl / usage-python3-pygame-transform-flip-vertical Passed
Flips a Pygame surface vertically via pygame.transform.flip(False, True) and confirms the top and bottom rows are swapped.
Pygame flips surface Port / libsdl / usage-python3-pygame-transform-flip Passed
Pygame transform grayscale Port / libsdl / usage-python3-pygame-transform-grayscale Passed
Applies pygame.transform.grayscale to a colored surface and verifies the output pixel has equal R, G, and B channels.
Pygame PixelArray inversion preserves dimensions and inverts pixel values Port / libsdl / usage-python3-pygame-transform-invert Passed
Inverts every pixel of a Surface via pygame.PixelArray indexing (255 - r, 255 - g, 255 - b) since pygame 2.5 has no transform.invert; verifies the result has the same dimensions, the originally bright (240, 240, 240) pixel becomes (15, 15, 15) within tolerance, and a black pixel becomes (255, 255, 255).
Pygame rotates surface Port / libsdl / usage-python3-pygame-transform-rotate Passed
pygame transform rotozoom Port / libsdl / usage-python3-pygame-transform-rotozoom Passed
Applies pygame.transform.rotozoom with a scale factor of two and verifies the resulting surface dimensions double exactly.
Pygame transform scale_by float factor Port / libsdl / usage-python3-pygame-transform-scale-by-float Passed
Scales a Pygame surface using pygame.transform.scale_by with a float factor and verifies the resulting integer dimensions.
Pygame transform scale Port / libsdl / usage-python3-pygame-transform-scale Passed
pygame transform scale2x Port / libsdl / usage-python3-pygame-transform-scale2x Passed
pygame transform smoothscale_by factor Port / libsdl / usage-python3-pygame-transform-smoothscale-by Passed
Resizes a pygame surface using transform.smoothscale_by with a fractional factor, saves the result as BMP, checks the BM magic, and asserts the new dimensions.
Pygame smoothscale transform Port / libsdl / usage-python3-pygame-transform-smoothscale Passed
Pygame transform laplacian highlights edge pixels Port / libsdl / usage-python3-pygame-transform-solid-overlay Passed
Applies pygame.transform.laplacian to a Surface that contains a single solid block (pygame 2.5 has no transform.solid_overlay) and verifies the result has matching dimensions, that interior block pixels collapse toward zero (no local edge), and that pixels along the block boundary report a non-zero edge response.
pygame transform threshold Port / libsdl / usage-python3-pygame-transform-threshold Passed
Uses pygame.transform.threshold against a known reference colour to count matching pixels on a tiny surface and verifies the returned match count equals the seeded pixels.
Pygame Vector2 angle_to Port / libsdl / usage-python3-pygame-vector2-angle-to Passed
Computes the signed angle between two pygame.math.Vector2 instances using angle_to and verifies the result equals 90 degrees within a small tolerance.
pygame Vector2 clamp_magnitude Port / libsdl / usage-python3-pygame-vector2-clamp-magnitude Passed
Calls pygame.math.Vector2.clamp_magnitude with a max less than the current length and verifies the resulting vector keeps direction while its length matches the requested cap.
Pygame Vector2 distance and reflect Port / libsdl / usage-python3-pygame-vector2-distance-reflect Passed
Validates pygame.math.Vector2 distance_to, normalize, and reflect operations against analytically known results.
pygame Vector2 dot product Port / libsdl / usage-python3-pygame-vector2-dot-product Passed
Pygame Vector2 elementwise multiplication Port / libsdl / usage-python3-pygame-vector2-elementwise Passed
Multiplies two pygame.math.Vector2 instances component-wise via the elementwise() proxy and verifies each component matches the per-axis product.
pygame vector2 length Port / libsdl / usage-python3-pygame-vector2-length Passed
Pygame Vector2 lerp Port / libsdl / usage-python3-pygame-vector2-lerp Passed
Linearly interpolates between two pygame.math.Vector2 instances at t=0, t=1, and t=0.25 and verifies each result matches the analytical formula.
pygame Vector2 magnitude Port / libsdl / usage-python3-pygame-vector2-magnitude Passed
Computes the magnitude and length of a pygame Vector2(3, 4) and verifies both methods return five.
pygame Vector2 rotate Port / libsdl / usage-python3-pygame-vector2-rotate Passed
pygame Vector3 cross product Port / libsdl / usage-python3-pygame-vector3-cross Passed
Computes the pygame Vector3 cross product of unit X and unit Y and verifies the result equals the unit Z basis vector.
pygame Vector3 dot product Port / libsdl / usage-python3-pygame-vector3-dot Passed
Computes pygame.math.Vector3.dot for orthogonal and parallel pairs and verifies the scalar matches the analytical sum of component products.
Pygame Vector3 normalize Port / libsdl / usage-python3-pygame-vector3-normalize Passed
Normalizes a pygame.math.Vector3 and verifies the result has unit length while the original vector is left unchanged.
Pygame xvfb display Port / libsdl / usage-python3-pygame-xvfb-display Passed
CVE-2017-2888 libsdl regression Port / libsdl / cve-2017-2888 Passed
Asserts that SDL_CreateRGBSurface refuses dimensions whose width*height*bpp arithmetic would overflow, returning NULL with an SDL_GetError diagnostic instead of under-allocating a surface that later triggers a buffer overflow.
CVE-2019-13626 libsdl regression Port / libsdl / cve-2019-13626 Passed
Asserts that SDL_LoadWAV refuses a crafted IMA ADPCM .wav whose fact-chunk sample count and block-align values would have driven the formerly-vulnerable IMA_ADPCM_decode arithmetic into a heap over-read; SDL must reject the file with an SDL_GetError diagnostic instead of crashing.
CVE-2020-14409 libsdl regression Port / libsdl / cve-2020-14409 Passed
Asserts that SDL_LoadBMP_RW refuses a crafted BMP whose width and height both pin near INT_MAX, returning NULL with an SDL_GetError diagnostic rather than wrapping the surface size arithmetic and under-allocating.