Пример #1
0
 def test_one_word(self):
     '''
     One word test assert
     '''
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Пример #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')
Пример #3
0
 def test_one_word(self):
     '''
     Test a single work is capitalized
     '''
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Пример #4
0
 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')
Пример #5
0
 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')
Пример #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"
     )
Пример #7
0
 def test_multiple_words(self):
     """
     TestCap
     """
     text = 'python test multiple'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python Test Multiple')
Пример #8
0
 def test_one_word(self):
     """
     TestCap
     """
     text = 'python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Python')
Пример #9
0
 def test_multiple_words(self):
     '''
     Multiple word test assert
     '''
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Пример #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")
Пример #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')
Пример #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')
Пример #13
0
 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')
Пример #14
0
 def test_multiple_word(self):
     text = "jupyter notebook"
     result = cap.cap_text(text)
     self.assertEqual(result, "Jupyter Notebook")
Пример #15
0
 def testsingleword(self):
     some_text = "letsupgrade"
     result = cap.cap_text(some_text)
     self.assertEqual(result, "Letsupgrade")
Пример #16
0
 def testMultipleWord(self):
     some_text = "sorry for the buffer"
     result = cap.cap_text(some_text)
     self.assertEqual(result, "Sorry For The Buffer")
Пример #17
0
 def test_multiple_words(self):
     text = 'multiple pythons'
     result = cap.cap_text(text)
     self.assertEqual(result, "Multiple Pythons")
Пример #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")
Пример #20
0
 def test_multiple_words(self):
     text = "monty python"
     result = cap.cap_text(text)
     self.assertEqual(result, "Monty Python")
Пример #21
0
 def test_two_words(self):
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty python')
Пример #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')
Пример #24
0
 def test_multiple_word(self):
     text = 'monty python'
     result = cap.cap_text(text)
     self.assertEqual(result, 'Monty Python')
Пример #25
0
 def test_two_words_fail(self):
     text = ''
     result = cap.cap_text(text)
     self.assertRaises(result)
Пример #26
0
 def test_single_word(self):
     text = "python"
     result = cap.cap_text(text)
     self.assertEqual(result, "Python")
Пример #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')
Пример #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')
Пример #30
0
 def test_one_word(self):
     text = 'python'
     result = cap.cap_text(text)
     self.assertEquals(result, 'Python')
Пример #31
0
 def test_3(self):
     print("Test3 " + __name__)
     self.assertNotEqual(cap.cap_text('python'), 'xython')
Пример #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")
Пример #33
0
 def test_4(self):
     #self.assertEqual(cap.cap_text('python'),'Python')
     print("Test4 " + __name__)
     self.assertEqual(cap.cap_text('python world', True), 'Python World')