Ejemplo n.º 1
0
 def test_words_with_quotes(self):
     """
     Edge case that will break capitalization with first double quote.
     """
     text = "\"You're despicable,\" said Daffy Duck"
     result = cap.just_do_it(text)
     self.assertEqual(result, "\"You're Despicable,\" Said Daffy Duck")
Ejemplo n.º 2
0
def test_one_word(self):
    """
    Should capitalize test word 'duck'
    and return capitalized word, 'Duck'.
    """
    text = 'duck'
    result = cap.just_do_it(text)
    self.assertEqual(result, 'Duck')  # Expected result should match 'Duck'.
Ejemplo n.º 3
0
 def test_words_with_apostrophes(self):
     """
     Should capitalize test phrase 
     'I'm fresh out of ideas' and 
     return capitalized phrase
     'I'M FRESH OUT OF IDEAS.'
     """
     text = "I'm fresh out of ideas"
     result = cap.just_do_it(text)
     self.assertEqual(result, "I'm Fresh Out Of Ideas")
Ejemplo n.º 4
0
 def test_multiple_words(self):
     """
     Should capitalize test phrase 
     'a veritable flock of ducks' and 
     return capitalized phrase
     'A Veritable Flock Of Ducks'.
     """
     text = 'a veritable flock of ducks'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'A Veritable Flock Of Ducks')
def test_words_with_apostrophes():
    text = "I'm fresh out of ideas"
    result = cap.just_do_it(text)
    eq_(result, "I'm Fresh Out Of Ideas")
Ejemplo n.º 6
0
 def test_multi_words(self):
     text = "a veritable flock of ducks"
     result = cap.just_do_it(text)
     self.assertEqual(result, "A Veritable Flock Of Ducks")
Ejemplo n.º 7
0
 def test_multiple_words(self):
     text = 'a veritable flock of duck'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'A Veritable Flock Of Duck')
Ejemplo n.º 8
0
 def test_multiple_words(self):
     text = 'a veritable flock of ducks'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'A Veritable Flock Of Ducks')
Ejemplo n.º 9
0
 def test_words_with_quotes(self):
     text = "\"You're despicable,\" said Daffy Duck"
     result = cap.just_do_it(text)
     self.assertEqual(result, "\"You're Despicable,\" Said Daffy Duck")
Ejemplo n.º 10
0
def test_one_word():
    text = 'duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Ejemplo n.º 11
0
def test_words_with_apostrophes():
    text = "I'm fresh out of ideas"
    result = cap.just_do_it(text)
    eq_(result, "I'm Fresh Out Of Ideas")
Ejemplo n.º 12
0
 def test_words_with_more_upper(self):
     text = "\"You're desPICable,\" said Daffy Duck"
     result = cap.just_do_it(text)
     self.assertEqual(result, "\"You're Despicable,\" Said Daffy Duck")
Ejemplo n.º 13
0
 def test_words_with_apostrophes(self):
     text = "I'm fresh out of ideas"
     result = cap.just_do_it(text)
     self.assertEqual(result, "I'm Fresh Out Of Ideas")
Ejemplo n.º 14
0
 def test_None(self):
     text = None
     result = cap.just_do_it(text)
     self.assertEqual(result, None)
Ejemplo n.º 15
0
 def test_with_quotes(self):
     '''测试带双引号的'''
     text = '"You\'re despicable ," said Daggy Duck'
     result = cap.just_do_it(text) 
     self.assertEqual(result,'"You\'re Despicable ," Said Daggy Duck')
def test_words_with_quotes():
    text = "\"You're despicable,\" said Daffy Duck"
    result = cap.just_do_it(text)
    eq_(result, "\"You're Despicable,\" Said Daffy Duck")
def test_one_word():
    text = "duck"
    result = cap.just_do_it(text)
    eq_(result, "Duck")
Ejemplo n.º 18
0
def test_multiple_words():
    '''测试连字符'''
    text = 'the most common relaxing procedure by women'
    result = cap.just_do_it(text)
    eq_(result, 'The Most Common Relaxing Procedure By Women')
Ejemplo n.º 19
0
def test_words_with_quotes():
    text = "\"You're despicable,\" said Daffy Duck"
    result = cap.just_do_it(text)
    eq_(result, "\"You're Despicable,\" Said Daffy Duck")
Ejemplo n.º 20
0
def test_with_quotes():
    '''测试带双引号的'''
    text = '"You\'re despicable ," said Daggy Duck'
    result = cap.just_do_it(text)
    eq_(result, '"You\'re Despicable ," Said Daggy Duck')
Ejemplo n.º 21
0
def test_multiple_words():
    text = 'a veritable flock of ducks'
    result = cap.just_do_it(text)
    eq_(result, 'A Veritable Flock Of Ducks')
Ejemplo n.º 22
0
def test_one_word():
    '''测试单字符'''
    text = 'Duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Ejemplo n.º 23
0
 def test_one_word(self):
     text = 'duck'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'Duck')
Ejemplo n.º 24
0
def test_one_word():
    text = 'duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Ejemplo n.º 25
0
 def test_one_word(self):
     text = 'duck'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'Duck')
def test_multiple_words():
    text = "a veritable flock of ducks"
    result = cap.just_do_it(text)
    eq_(result, "A Veritable Flock Of Ducks")
Ejemplo n.º 27
0
 def test_words_with_apostrophes(self):
     text = "I'm fresh out of ideas"
     result = cap.just_do_it(text)
     self.assertEqual(result, "I'm Fresh Out Of Ideas")
Ejemplo n.º 28
0
 def test_one_word(self):
     text = "duck"
     result = cap.just_do_it(text)
     self.assertEqual(result, "Duck")