def test_cikarma(self): self.assertEqual(MainFunc.cikarma(10, 6), 4) pass
def slot_btn_function(self): self.hide() self.f = MainFunc.MainWindow() self.f.show()
def test_toplama(self): self.assertEqual(MainFunc.toplama(5, 6), 11) pass
def test_tersCevir(self): self.assertTrue(MainFunc.tersCevir("Yazılım_Kalite"), "etilaK_mılızay") pass
def test_carpma(self): self.assertEqual(MainFunc.carpma(5, 6), 30) print("Doğru") pass
def test_bolme(self): self.assertEqual(MainFunc.bolme(15, 3), 5) pass
# # 游戏入口 # from Define import * import Extern as Et import MainFunc as MF import Interface as IF import pygame from pygame.locals import * import os import time MF.init() #pygame初始化 # 主循环 while True: # 退出机制 for event in pygame.event.get(): MF.gameQuit(event) # 时间刷新 if MF.timeUpdate(): IF.update(event) MF.gameStateManager() pygame.display.update() #更新显示