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)
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))