Пример #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)
Пример #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)
Пример #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)
Пример #4
0
 def test_easy_input(self):
     self.assertEquals(counter("rajni"), 5)
Пример #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)
Пример #6
0
 def test_medium_input(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter("M%$#98"), 6)
Пример #7
0
 def test_hard_input(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter(""), 0)
Пример #8
0
 def test_medium_input_two(self):
     self.assertEqual(counter('Joanna White'), 11)
Пример #9
0
 def test_hard_input(self):
     with self.assertRaises(Exception):
         self.assertEqual(counter(' '), 0)
Пример #10
0
 def test_easy_input_two(self):
     self.assertEqual(counter('Joanna'), 6)
Пример #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)
Пример #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)
Пример #15
0
 def test_easy_input(self):
     self.assertEqual(counter("Leksus"), 6)
Пример #16
0
 def test_hard_input_two(self):
     with self.assertRaises(AttributeError):
         self.assertEqual(counter(None), 0)
Пример #17
0
 def test_easy_input_two(self):
     self.assertEqual(counter("Alina"), 5)
Пример #18
0
 def test_easy_input(self):
     self.assertEqual(counter('Jo'), 2)
Пример #19
0
 def test_medium_input_two(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter("raj  ni"), 7)
Пример #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)
Пример #21
0
 def test_hard_input_two(self):
     with self.assertRaises(ValueError):
         self.assertEquals(counter(None), 4)
Пример #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)
Пример #23
0
 def test_easy_input_two(self):
     self.assertEquals(counter("MO"), 2)
Пример #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)