Пример #1
0
 def test_return_1A1B_when_1378(self):
     self.assertEqual(CompareNumber.compare(self.answer, '1378'), '1A1B')
Пример #2
0
 def test_return_4A0B_when_1234(self):
     self.assertEqual(CompareNumber.compare(self.answer, '1234'), '4A0B')
Пример #3
0
 def test_return_0A0B_when_5678(self):
     self.assertEqual(CompareNumber.compare(self.answer, '5678'), '0A0B')
Пример #4
0
 def test_return_2A4B_when_1243(self):
     self.assertEqual(CompareNumber.compare(self.answer, '1243'), '2A2B')
Пример #5
0
 def test_return_0A4B_when_4321(self):
     self.assertEqual(CompareNumber.compare(self.answer, '4321'), '0A4B')
Пример #6
0
 def test_return_3A0B_when_1235(self):
     self.assertEqual(CompareNumber.compare(self.answer, '1235'), '3A0B')
Пример #7
0
 def guess(self, input_string):
     is_legal, message = self.is_input_legal(input_string)
     if is_legal:
         return CompareNumber.compare(self._answer, input_string)
     else:
         return message