Exemplo n.º 1
0
 def test_max_neg_int(self):
     # What if we let it overflow the full 14 bits?
     last = Turn(WIN, protocol.max_neg_int - 1, seasons=(SPR, SUM, FAL, AUT, WIN))
     next = last.next()
     msg = Message(next)
     self.assertEqual(msg.fold(), [SPR, protocol.max_neg_int])
Exemplo n.º 2
0
 def test_end_of_time(self):
     # What happens when we run out of years?
     last = Turn(WIN, protocol.max_pos_int - 1, seasons=(SPR, SUM, FAL, AUT, WIN))
     next = last.next()
     msg = Message(next)
     self.assertEqual(msg.fold(), [SPR, protocol.max_pos_int])