Exemple #1
0
 def test_one_word(self):
     '''
     One word test assert
     '''
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Exemple #2
0
 def test_two_words(self):
     '''
     Test both words of a two word string are capitalized
     '''
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Exemple #3
0
 def test_one_word(self):
     '''
     Test a single work is capitalized
     '''
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
 def test_multiple_words(self):
     '''
     Another method test case of our function
     '''
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
 def test_one_word(self):
     '''
     It checks if the tet python is capitalised to python by calling from cap.py fn.
     '''
     text='python'
     result=cap.cap_text(text)
     self.assertEqual(result,'Python')
Exemple #6
0
 def testTenWords(self):
     some_text = "i welcome you all to letsupgrade, a freedom providing startup in education"
     result = cap.cap_text(some_text)
     self.assertEqual(
         result,
         "I Welcome You All To Letsupgrade, A Freedom Providing Startup In Education"
     )
Exemple #7
0
 def test_multiple_words(self):
     """
     TestCap
     """
     text = 'python test multiple'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python Test Multiple')
Exemple #8
0
 def test_one_word(self):
     """
     TestCap
     """
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Exemple #9
0
 def test_multiple_words(self):
     '''
     Multiple word test assert
     '''
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Exemple #10
0
 def test_one_word(
     self
 ):  # All test methods must start with test_xxx or it will not execute
     """Single word test"""
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, "Python")
Exemple #11
0
    def test_multiple_words(self):
        """
        Should return true if words capitalized properly.
        """

        text = "hi world"
        result = cap.cap_text(text)
        self.assertEqual(result, 'Hi world')
Exemple #12
0
    def test_one_word(self):
        """
        Should return true if word capitalized properly.
        """

        text = "hi"
        result = cap.cap_text(text)
        self.assertEqual(result, 'Hi')
 def test_one_word(self):
     '''
     The format of the method is simple
     we give it an input in this case text
     we define a variable hold the value returned after invoking our function
     then we assert that our result matches the result we expected
     It is important to note that first is the result from the function we invoked
     and then is the result we expect it to give us.
     This order is very important otherwise the test result will not be right.
     '''
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Exemple #14
0
 def test_multiple_word(self):
     text = "jupyter notebook"
     result = cap.cap_text(text)
     self.assertEqual(result, "Jupyter Notebook")
Exemple #15
0
 def testsingleword(self):
     some_text = "letsupgrade"
     result = cap.cap_text(some_text)
     self.assertEqual(result, "Letsupgrade")
Exemple #16
0
 def testMultipleWord(self):
     some_text = "sorry for the buffer"
     result = cap.cap_text(some_text)
     self.assertEqual(result, "Sorry For The Buffer")
Exemple #17
0
 def test_multiple_words(self):
     text = 'multiple pythons'
     result = cap.cap_text(text)
     self.assertEqual(result, "Multiple Pythons")
Exemple #18
0
 def test_one_word(self):
     """test whether the first letter is capitalised or not"""
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
 def test_with_apostrophes(self):
     text = "monty python's flying circus"
     result = cap.cap_text(text)
     self.assertEqual(result, "Monty Python's Flying Circus")
Exemple #20
0
 def test_multiple_words(self):
     text = "monty python"
     result = cap.cap_text(text)
     self.assertEqual(result, "Monty Python")
Exemple #21
0
 def test_two_words(self):
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty python')
Exemple #22
0
 def test_multiplr_words(self):
     text = 'hello there'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Hello There')
 def test_multiple_words(self):
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Exemple #24
0
 def test_multiple_word(self):
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Exemple #25
0
 def test_two_words_fail(self):
     text = ''
     result = cap.cap_text(text)
     self.assertRaises(result)
Exemple #26
0
 def test_single_word(self):
     text = "python"
     result = cap.cap_text(text)
     self.assertEqual(result, "Python")
Exemple #27
0
 def test_multiple_words(self):
     """for multiple words, check if first letter is capitalized"""
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Exemple #28
0
 def test_two_words(self):
     text = 'james bond'
     result = cap.cap_text(text)
     self.assertEquals(result, 'James bond')
 def test_one_word(self):
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Exemple #30
0
 def test_one_word(self):
     text = 'python'
     result = cap.cap_text(text)
     self.assertEquals(result, 'Python')
 def test_3(self):
     print("Test3 " + __name__)
     self.assertNotEqual(cap.cap_text('python'), 'xython')
Exemple #32
0
 def test_with_apostrophes(self):
     text = "monty python's flying circus"
     result = cap.cap_text(text)
     self.assertEqual(result, "Monty Python's Flying Circus")
 def test_4(self):
     #self.assertEqual(cap.cap_text('python'),'Python')
     print("Test4 " + __name__)
     self.assertEqual(cap.cap_text('python world', True), 'Python World')