示例#1
0
 def test_strip_vowels(self):
     self.assertEqual('Hll, wrld', strip_vowels("Hello, world"))
     self.assertEqual(' lk trtls', strip_vowels("I like turtles"))
     self.assertEqual('', strip_vowels("aeiou"))
     self.assertEqual('bcdfghjklmnpqrstvwxyz', strip_vowels("bcdfghjklmnpqrstvwxyz"))        
     self.assertEqual('bcdf', strip_vowels("abecidoeuf"))
     self.assertEqual('Hppnss dpnds pn rslvs', strip_vowels("Happiness depends upon ourselves"))
     self.assertEqual('Chrnnhtnthlgs', strip_vowels("Chrononhotonthologos"))
     self.assertEqual('HNRFCBLTDNTTBS', strip_vowels("HONORIFICABILITUDINITATIBUS"))
     self.assertEqual('Phlp M. Drn, Jhn Dvd N. Dns, Ry Tl, Ms Ktmr', strip_vowels("Philip M. Dorin, John David N. Dionisio, Ray Toal, Masao Kitamura"))
     self.assertEqual('`~!@#$%^&*()_+-=[]{};./>?', strip_vowels("`~!@#$%^&*()_+-=[]{};./>?"))
 def test_strip_vowels( self ):
     self.assertEqual( 'Hll, wrld', strip_vowels( 'Hello, world' ) )
     self.assertEqual( '', strip_vowels( 'aeiouAEIOU' ) )
     self.assertEqual( 'LL YR BS R BLNG T S', strip_vowels( 'ALL YOUR BASE ARE BELONG TO US' ) )
     self.assertEqual( 'Msssspp', strip_vowels( 'Mississippi' ) )
     self.assertEqual( 'nmtp', strip_vowels( 'onomatopoeia' ) )
     self.assertEqual( '`~1!2@3#4$5%6^7&8*9(0)-_=+[{]}\|;:,<.>/?', strip_vowels( '`~1!2@3#4$5%6^7&8*9(0)-_=+[{]}\|;:,<.>/?' ) )
 def test_strip_vowels(self):
     self.assertEqual('Hll, wrld', strip_vowels('Hello, world'))
     self.assertEqual('', strip_vowels('aeiouAEIOU'))
     self.assertEqual('LL YR BS R BLNG T S',
                      strip_vowels('ALL YOUR BASE ARE BELONG TO US'))
     self.assertEqual('Msssspp', strip_vowels('Mississippi'))
     self.assertEqual('nmtp', strip_vowels('onomatopoeia'))
     self.assertEqual(
         '`~1!2@3#4$5%6^7&8*9(0)-_=+[{]}\|;:,<.>/?',
         strip_vowels('`~1!2@3#4$5%6^7&8*9(0)-_=+[{]}\|;:,<.>/?'))
 def test_strip_vowels(self):
     self.assertEqual('Hll, wrld', strip_vowels("Hello, world"))
     
     # Random characters other than letters and numbers
     self.assertEqual('Stphn*&^%$, Smth!@#', strip_vowels('Stephen*&^%$, Smith!@#'))
     
     # Empty string to empty string
     self.assertEqual('', strip_vowels(''))
     
     # Numerical characters, underscore, and dash
     self.assertEqual('stphn8- _gr9t', strip_vowels('stephen8- _gre9at'))
     
     # Capital letters
     self.assertEqual('T', strip_vowels('EAT'))
     
     # String with characters to empty string
     self.assertEqual('', strip_vowels('EA'))
示例#5
0
 def test_strip_vowels(self):
     self.assertEqual('Hll, wrld', strip_vowels("Hello, world"))
     self.assertEqual('', strip_vowels("AEIOU"))
     self.assertEqual('', strip_vowels("aeiou"))
     self.assertEqual('Zn Qncy Knsl', strip_vowels("Zane Quincy Kansil"))
     self.assertEqual('Tm Mrvl Rddl', strip_vowels("Tom Marvolo Riddle"))
     self.assertEqual('BbCcDdFfGgHhJjKkLlMmNnPpQqRrSsTtVvWwXxYyZz', strip_vowels("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"))
     self.assertEqual('Blln lk  gt prh Wnfry mny~', strip_vowels("Ballin like I got Oprah Winfrey money~"))
     self.assertEqual('Swt hm lbm', strip_vowels("Sweet home Alabama"))
     self.assertEqual('nc pn  tm thr ws  bg hg gnt Mn p thr.', strip_vowels("Once upon a time there was a big huge giant Moon up there."))
     self.assertEqual('Ty Stry 2', strip_vowels("Toy Story 2"))
     self.assertEqual('Hrvst Mn, th rgn f fllng brcclsrs', strip_vowels("Harvest Moon, the reign of falling broccolisaurs"))
示例#6
0
 def test_strip_vowels(self):
     self.assertEqual('Hll, wrld', strip_vowels("Hello, world"))
     self.assertEqual('', strip_vowels("AEIOU"))
     self.assertEqual('', strip_vowels("aeiou"))
     self.assertEqual('Zn Qncy Knsl', strip_vowels("Zane Quincy Kansil"))
     self.assertEqual('Tm Mrvl Rddl', strip_vowels("Tom Marvolo Riddle"))
     self.assertEqual(
         'BbCcDdFfGgHhJjKkLlMmNnPpQqRrSsTtVvWwXxYyZz',
         strip_vowels(
             "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"))
     self.assertEqual(
         'Blln lk  gt prh Wnfry mny~',
         strip_vowels("Ballin like I got Oprah Winfrey money~"))
     self.assertEqual('Swt hm lbm', strip_vowels("Sweet home Alabama"))
     self.assertEqual(
         'nc pn  tm thr ws  bg hg gnt Mn p thr.',
         strip_vowels(
             "Once upon a time there was a big huge giant Moon up there."))
     self.assertEqual('Ty Stry 2', strip_vowels("Toy Story 2"))
     self.assertEqual(
         'Hrvst Mn, th rgn f fllng brcclsrs',
         strip_vowels("Harvest Moon, the reign of falling broccolisaurs"))