def test():
logging.info("Importing pygame")
import pygame
result = pygame.init()
logging.info("Result of initiating pygame: {}".format(result))
if result[1] != 0:
if result[1] == 1 and pygame.mixer.get_init() is None:
logging.warning("WARNING: pygame mixer module is not initializing properly, however since this is "
"not required the test will still pass.")
else:
logging.error("ERROR: Unable to properly initialize pygame (from pygame: {})".format(
pygame.get_error()))
raise AssertionError()
# otherwise the test passes
评论列表
文章目录