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