def test_number_to_name(self): # make sure the shuffled sequence does not lose any elements self.assertEqual(rpsls.number_to_name(0), 'rock') self.assertEqual(rpsls.number_to_name(1), 'Spock') self.assertEqual(rpsls.number_to_name(2), 'paper') self.assertEqual(rpsls.number_to_name(3), 'lizard') self.assertEqual(rpsls.number_to_name(4), 'scissors')
def test_number_to_name(self): self.assertEquals(rpsls.number_to_name(0), "rock"); self.assertEquals(rpsls.number_to_name(1), "Spock"); self.assertEquals(rpsls.number_to_name(2), "paper"); self.assertEquals(rpsls.number_to_name(3), "lizard"); self.assertEquals(rpsls.number_to_name(4), "scissors");
def test_number_to_name_negative1(self): self.assertEqual(r.number_to_name(-1),'unknown')
def test_number_to_name_4(self): self.assertEqual(r.number_to_name(4),'scissors')
def test_number_to_name_100(self): self.assertEqual(r.number_to_name(100),'unknown')
def test_number_to_name_3(self): self.assertEqual(r.number_to_name(3),'lizard')
def test_number_to_name_2(self): self.assertEqual(r.number_to_name(2),'paper')
def test_number_to_name_1(self): self.assertEqual(r.number_to_name(1),'Spock')
def test_number_to_name_0(self): self.assertEqual(r.number_to_name(0),'rock')
def test_number_to_name(self): self.assertEquals(rpsls.number_to_name(0), "rock") self.assertEquals(rpsls.number_to_name(1), "Spock") self.assertEquals(rpsls.number_to_name(2), "paper") self.assertEquals(rpsls.number_to_name(3), "lizard") self.assertEquals(rpsls.number_to_name(4), "scissors")