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