File: platform_test.py

package info (click to toggle)
pysdl2 0.9.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,328 kB
  • sloc: python: 24,685; makefile: 36; sh: 8
file content (17 lines) | stat: -rw-r--r-- 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys
import pytest
import sdl2


def test_SDL_GetPlatform():
    retval = sdl2.SDL_GetPlatform()
    if sys.platform in ("win32", "cygwin"):
        assert retval == b"Windows"
    elif sys.platform.startswith("linux"):
        assert retval == b"Linux"
    elif sys.platform.startswith("freebsd"):
        assert retval == b"FreeBSD"
    elif sys.platform.startswith("darwin"):
        assert retval == b"Mac OS X"
    # Do not check others atm, since we are unsure about what Python will
    # return here.