Exemplo n.º 1
0
 def test_hard_input_three(self):
     # Todo: make sure that your program assert only string.
     with self.assertRaises(TypeError):
         self.assertEqual(counter(41), 0)
Exemplo n.º 2
0
 def test_hard_input(self):
     # Todo: make sure that the program raises an exception whenever an empty string is given.
     with self.assertRaises(TypeError):
         self.assertEqual(counter(""), 0)
Exemplo n.º 3
0
 def test_hard_input_two(self):
     # Todo: make sure that your program does not accept a None input.
     with self.assertRaises(TypeError):
         self.assertEqual(counter(None), 0)
Exemplo n.º 4
0
 def test_easy_input(self):
     self.assertEquals(counter("rajni"), 5)
Exemplo n.º 5
0
 def test_medium_input_two(self):
     # Todo: make sure that your program does not count paces. It should only count english alpha.
     self.assertEqual(counter("Mohammad Mahjoub"), 15)
Exemplo n.º 6
0
 def test_medium_input(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter("M%$#98"), 6)
Exemplo n.º 7
0
 def test_hard_input(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter(""), 0)
Exemplo n.º 8
0
 def test_medium_input_two(self):
     self.assertEqual(counter('Joanna White'), 11)
Exemplo n.º 9
0
 def test_hard_input(self):
     with self.assertRaises(Exception):
         self.assertEqual(counter(' '), 0)
Exemplo n.º 10
0
 def test_easy_input_two(self):
     self.assertEqual(counter('Joanna'), 6)
Exemplo n.º 11
0
 def test_medium_input(self):
     with self.assertRaises(Exception):
         self.assertEqual(counter('Jo!@#$%^'), 2)
 def test_easy_input_two(self):
     # Todo: make sure that your program returns 8 given the string 'Mohammad'
     self.assertEqual(counter("Mohammad"), 8)
 def test_easy_input(self):
     # Todo: make sure that your program returns 2 given the string 'Mo'
     self.assertEqual(counter("Mo"), 2)
Exemplo n.º 14
0
 def test_hard_input(self):
     with self.assertRaises(Exception):
         # Todo: make sure that your program does not accept an empty string.
         self.assertEqual(counter(""), 0)
Exemplo n.º 15
0
 def test_easy_input(self):
     self.assertEqual(counter("Leksus"), 6)
Exemplo n.º 16
0
 def test_hard_input_two(self):
     with self.assertRaises(AttributeError):
         self.assertEqual(counter(None), 0)
Exemplo n.º 17
0
 def test_easy_input_two(self):
     self.assertEqual(counter("Alina"), 5)
Exemplo n.º 18
0
 def test_easy_input(self):
     self.assertEqual(counter('Jo'), 2)
Exemplo n.º 19
0
 def test_medium_input_two(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter("raj  ni"), 7)
Exemplo n.º 20
0
 def test_medium_input(self):
     # Todo: make sure that the program raises an exception whenever there is any non-english charts. Ex. !@#$%^.
     with self.assertRaises(TypeError):
         self.assertEqual(counter("Alin@"), 5)
Exemplo n.º 21
0
 def test_hard_input_two(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter(None), 4)
Exemplo n.º 22
0
 def test_medium_input_two(self):
     # Todo: make sure that your program does not count paces. It should only count english alpha.
     self.assertEqual(counter("Alina Kotik"), 10)
Exemplo n.º 23
0
 def test_easy_input_two(self):
     self.assertEquals(counter("MO"), 2)
Exemplo n.º 24
0
 def test_medium_input(self):
     with self.assertRaises(Exception):
         # Todo: make sure that the program raises an exception whenever there is any non-english charts.
         self.assertEqual(counter("Mo?."), 4)