Пример #1
0
 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')
Пример #2
0
 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");
Пример #3
0
 def test_number_to_name_negative1(self):
     self.assertEqual(r.number_to_name(-1),'unknown')
Пример #4
0
 def test_number_to_name_4(self):
     self.assertEqual(r.number_to_name(4),'scissors')
Пример #5
0
 def test_number_to_name_100(self):
     self.assertEqual(r.number_to_name(100),'unknown')
Пример #6
0
 def test_number_to_name_3(self):
     self.assertEqual(r.number_to_name(3),'lizard')
Пример #7
0
 def test_number_to_name_2(self):
     self.assertEqual(r.number_to_name(2),'paper')
Пример #8
0
 def test_number_to_name_1(self):
     self.assertEqual(r.number_to_name(1),'Spock')
Пример #9
0
 def test_number_to_name_0(self):
     self.assertEqual(r.number_to_name(0),'rock')
Пример #10
0
 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")