예제 #1
0
 def test_comparar_string(self):
     anagrama = Anagrama('a', 'a')
     self.assertTrue(anagrama.comparar_string())
     anagrama = Anagrama('ab', 'ab')
     self.assertTrue(anagrama.comparar_string())
     anagrama = Anagrama('roma', 'amor')
     self.assertTrue(anagrama.comparar_string())
     anagrama = Anagrama('ba', 'ab')
     self.assertTrue(anagrama.comparar_string())
     anagrama = Anagrama('b', 'ab')
     self.assertFalse( anagrama.comparar_string())
     anagrama = Anagrama('ba', 'a')
     self.assertFalse(anagrama.comparar_string())
예제 #2
0
 def test_espaco(self):
     anagrama = Anagrama(' ', '')
     self.assertTrue(anagrama.comparar_string())
     anagrama = Anagrama('a', 'a      ')
     self.assertTrue(anagrama.comparar_string())
예제 #3
0
 def test_string_vazio(self):
     anagrama = Anagrama('', '')
     self.assertTrue(anagrama.comparar_string())