Beispiel #1
0
 def test_scramble(self):
     data = [
         "a", "rat", "BSOD", "BDFL", "Python testing", " a b c ",
         "Hannah Montana", "142452729"
     ]
     for s in data:
         self.assertTrue(anagram(s, scramble(s)))
 def test_scramble(self):
     # I added the empty string, a string with characters other than letters and nubmers, 
     # a string with an underscore, and 2 strings
     # with the same value to make sure that my function is truly random, so the chances of it 
     # randomly scrambling a string in the same way is very low 
     data = ["a", "rat", "BSOD", "BDFL", "Python testing", 
             "", "Steve08##$","unit_test", "Steve Jobs", "Steve Jobs"]
     for s in data:
         self.assertTrue(anagram(s, scramble(s)))
 def test_scramble( self ):
     data = [ "a", "rat", "BSOD", "BDFL", "Python testing" ]
     for s in data:
         self.assertTrue( anagram( s, scramble( s ) ) )
 def test_scramble(self):
     data = ["a", "rat", "BSOD", "BDFL", "Python testing"]
     for s in data:
         self.assertTrue(anagram(s, scramble(s)))
Beispiel #5
0
 def test_scramble(self):
     data = ["a", "rat", "BSOD", "BDFL", "Python testing", " a b c ", "Hannah Montana", "142452729"]
     for s in data:
         self.assertTrue(anagram(s, scramble(s)))
Beispiel #6
0
 def test_scramble(self):
     data = ["a", "rat", "BSOD", "BDFL", "Python testing", "I like turtles", "Happiness depends upon ourselves."]
     for s in data:
         self.assertTrue(anagram(s, scramble(s)))