1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
import sys
import pytest
from sdl2 import platform
class TestSDLPlatform(object):
__tags__ = ["sdl"]
def test_SDL_GetPlatform(self):
retval = platform.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.
|