Пример #1
0
 def test_ans3(self):
     self.assertEqual(find_shortest_string(list("a1.1.aa.+"), 'a', 4),
                      math.inf)
Пример #2
0
 def test1(self):
     with self.assertRaises(ValueError):
         find_shortest_string('ab + c.', 'a', 6, 5)
Пример #3
0
 def test_ans3(self):
     self.assertEqual(find_shortest_string(list("ab.c+"), 'c', 2), math.inf)
Пример #4
0
 def test_ans2(self):
     self.assertEqual(find_shortest_string(list("ab.c+"), 'c', 1), 1)
Пример #5
0
 def test_ans1(self):
     self.assertEqual(find_shortest_string(list("ab+c."), 'a', 1), 1)
Пример #6
0
 def test4(self):
     with self.assertRaises(ValueError):
         find_shortest_string('ab+c.', 'asxdf', 2)
Пример #7
0
 def test3(self):
     with self.assertRaises(ValueError):
         find_shortest_string('ab + c.', 9, 8)