コード例 #1
0
ファイル: WargameTests.py プロジェクト: zekoff/wargame
 def testPushingAllocationRemovesOldest(self):
     faction = Faction()
     faction.setupHistory()
     faction.OFF = 30
     faction.DEF = 40
     faction.ESP = 30
     faction.recordCurrentAllocationToHistory()
     self.assertEqual(len(faction.allocationHistory), faction.historicalDataWindowSize)
コード例 #2
0
ファイル: WargameTests.py プロジェクト: zekoff/wargame
 def testRecordCurrentAllocationMethodExists(self):
     faction = Faction()
     faction.setupHistory()
     faction.OFF = 30
     faction.DEF = 40
     faction.ESP = 30
     faction.recordCurrentAllocationToHistory()
     self.assertEqual(faction.allocationHistory[len(faction.allocationHistory) - 1], (30, 40, 30))