0
希望这个问题有一个简单的答案。这可能是我正在做的愚蠢!Eclipse中的Python单元测试只运行一个函数
在Eclipse中,对下面的代码运行对于Python单元测试:“这里的”
import unittest
from ShipClass import *
from Graphics import *
class UnitTesting(unittest.TestCase):
def testInit(self):
self.screen = load_screen()
assert load_background() == True
print("Here!")
def spawnShip(self):
ship = Ship((self.screen.get_rect().x, self.screen.get_rect().y))
self.screen.blit(ship.image, ship.rect)
print("Here!")
assert updateDisplay() == True
的代码只输出一个到控制台。它还说,“冉1测试...”等。
为什么它不运行这两个测试?
感谢您的帮助。
谢谢!就是这样 –