test_source.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:TicTacTio 作者: DevelopForLizardz 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号