Exemplo 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")
Exemplo 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'.
Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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')
Exemplo 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')
Exemplo 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")
Exemplo n.º 10
0
def test_one_word():
    text = 'duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo n.º 14
0
 def test_None(self):
     text = None
     result = cap.just_do_it(text)
     self.assertEqual(result, None)
Exemplo 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")
Exemplo 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')
Exemplo 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")
Exemplo 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')
Exemplo 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')
Exemplo n.º 22
0
def test_one_word():
    '''测试单字符'''
    text = 'Duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Exemplo n.º 23
0
 def test_one_word(self):
     text = 'duck'
     result = cap.just_do_it(text)
     self.assertEqual(result, 'Duck')
Exemplo n.º 24
0
def test_one_word():
    text = 'duck'
    result = cap.just_do_it(text)
    eq_(result, 'Duck')
Exemplo 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")
Exemplo 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")
Exemplo n.º 28
0
 def test_one_word(self):
     text = "duck"
     result = cap.just_do_it(text)
     self.assertEqual(result, "Duck")